Azure-Samples/active-directory-dotnet-desktop-msgraph-v2

Invalid redirect uri error - possible missing step

DonalSlemon opened this issue · 0 comments

Running the sample using a personal account - i.e. with 'Tenant' set to 'common'

When running the sample app, after following the steps in the Readme the error 'Error Acquiring Token Silently:
MSAL.Desktop.4.55.0.0.MsalServiceException:
ErrorCode: WAM_provider_error_3399614473
Microsoft.Identity.Client.MsalServiceException: WAM Error
Error Code: 3399614473
Error Message: ApiContractViolation
WAM Error Message: (pii)
Internal Error Code: 557973642
' is returned.

The detail of this is: '**Possible causes:

  • Invalid redirect uri - ensure you have configured the following url in the application registration in Azure Portal: ms-appx-web://microsoft.aad.brokerplugin/00000000-bcbc-0000-dede-s8s8s8s8s8s8**' (dummy GUID replaces actual ClientID).

Resolution:
Adding this as an additional Redirect URI (i.e. in addition to 'https://login.microsoftonline.com/common/oauth2/nativeclient') resolves the error.

I'd suggest the readme be amended to include this step for the scenario where applicable.