Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hockeyfrissa/674adcfe20b43600ce7a6a400eb11a6b to your computer and use it in GitHub Desktop.
Save hockeyfrissa/674adcfe20b43600ce7a6a400eb11a6b to your computer and use it in GitHub Desktop.
Add redirect uri to Microsoft graph toolkit mgt-login
Providers.globalProvider = new MsalProvider({
clientId: '<Application client id>',
authority:"https://login.microsoftonline.com/<tenant>",
scopes:['api://<api uri>/<api scope>'],
options:{
auth:{
redirectUri:'<Your url to redirect to as specified in app registration Authentication Redirect URIs>',
navigateToLoginRequestUrl:<true/false>
}
}
});
@jeff-r-koyaltech
Copy link

Msal2 is a little different. The redirectUri in particular doesn't fall under options and auth.

Providers.globalProvider = new Msal2Provider({
  clientId: configuration.auth.clientId,
  scopes: ['openid', 'profile'],
  redirectUri,
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment