Microsoft Graph API redirect_uri error

Adam Clarke 1 Reputation point
2020-08-11T12:45:52.187+00:00

I'm using the Microsoft Graph API to connect to Hotmail inboxes as part of the overall solution. I have followed the tutorial here: https://video2.skills-academy.com/en-us/samples/microsoftgraph/aspnet-snippets-sample/microsoft-graph-snippets-sample-for-aspnet-core-31/ and have the solution running well in the development environment.

However, when I deploy the site to IIS on my web server, the error:
invalid_request: The provided value for the input parameter 'redirect_uri' is not valid. The expected value is a URI which matches a redirect URI registered for this client application.
is displayed. I cannot see any problems with the redirect URL set in the AAD screens.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,155 questions
{count} votes

1 answer

Sort by: Most helpful
  1. 2020-08-12T01:01:02.233+00:00

    Ensure your application is being accesed using the reply URL authority. If your reply URL is https://mysite/reply you have to access your application using https://mysite but not https://mysitealias or any other alias since your application will use the latter and build an incorrect reply URL.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.