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

Invalid redirect uri error - possible missing step

Open
#103 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
159
Forks
107
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.