Hope you all are safe & sound, I was migrating my angular app authentication from ADAL JS to MSAL JS.
In ADAL JS, I have my ADAL Config as follows and the authentication works as expected:
adalConfig: {
tenant: 'GUID',
clientId: 'GUID',
redirectUri: window.location.origin
......
...... // other properties
}
In MSAL Config I tried to set the same properties in app.module.ts
MsalModule.forRoot({
auth: {
clientId: "GUID", // Same as the client ID of ADAL JS
authority: https://login.microsoftonline.com/<tenant GUID>/, // Same as the tenant GUID of ADAL JS
redirectUri: OAuthSettings.redirectUri, // This is your redirect URI
},
cache: {
cacheLocation: 'localStorage',
// storeAuthStateInCookie: true, // set to true for IE 11
}
However I keep on getting this error
"Please set the correlationId as a valid guid"
I tried looking at this documentation from Microsoft, but it mentions nothing about the authority.
Any help would be highly appreciated.
correlationId
would be seen in MSAL logs. As the doc shows, correlationId is a unique identifier, used to map the request with the response for debugging purposes.You could try the code from this link: