AzureAD / MSAL.PS

MIT License
159 stars 29 forks source link

Get-MsalToken -AzureCloudInstance not working #23

Closed damorris closed 3 years ago

damorris commented 3 years ago

when using Get-Msaltoken -ClientId XXXXXX -TenantId xxxxxxx -AzureCloudInstance AzureUSGovernment a Sign in to your account windows pops up and I pick my account > which goes to taking you to your orgs sign in page > but it errors with AADSTS50011: The URL specified in the request does not match the reply URLs configured for the application

should this work with all Gov clouds GCC, GCCH, DOD ?

jazuntee commented 3 years ago

I have not tested the command when connecting to the USGov cloud but the error you are getting does not sound related. You did not specify a RedirectUri in the commend so MSAL defaults to https://login.microsoftonline.com/common/oauth2/nativeclient. You need to ensure that url is configured as a Redirect URI on the application object in AAD with ClientId XXXXXX. image