Is MSAL client side?

Joe S George 46 Reputation points
2020-05-20T16:54:51.233+00:00

Hi Team,

I am trying to to add azure AD B2C authentication to my project. The example code that I found includes msal. I am using nodeJS. Now I am getting the error "navigator is not defined".

code:
const clientId = "INSERT-CLIENT-APP-ID"; // Client Id of the registered application
const callback = (errorDesc, token, error, tokenType) => {};
// An Optional options for initializing the MSAL @SEE https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options
const options = {
redirectUri: "Your redirect URI",
};
const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes

// Initialize the MSAL @SEE https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal
const userAgentApplication = new UserAgentApplication(clientId, undefined, callback, options);
const authProvider = new MSALAuthenticationProvider(userAgentApplication, graphScopes );

link: https://learn.microsoft.com/en-us/graph/sdks/create-client?view=graph-rest-1.0&tabs=Javascript

Is msal client side? If so is there any alternative?.

Please help. Thank You

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,664 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful