The following forum(s) have migrated to Microsoft Q&A (Preview): Azure Active Directory!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
AADSTS70000: The provided value for the 'redirect_uri' is not valid. RRS feed

  • Question

  • Hi,

    I'm trying to get outlook contacts into my web app. I'm trying to get the access token for the post request (after I get the code).

    This is the response I get :

    "error_description""AADSTS70000: The provided value for the 'redirect_uri' is not valid. 

    The value must exactly match the redirect URI used to obtain the authorization code.

    \r\nTrace ID: 3185266c-930c-4a7c-ac59-9651e6a50701\r\nCorrelation ID:

     b99c5c6b-4e39-465b-8fc1-227cd32228f5\r\nTimestamp: 2019-11-13 16:19:52Z"

    Although, I entered the same value for redirect_uri in both aad and my app. The uri is http://localhost:8100

    and I tried in my app entering the same with and without uri encoding. Still it gives me this error,

    any clue how I can solve this?

    Wednesday, November 13, 2019 4:26 PM

Answers

  • I see you are using http:// in the redirect uri (http://localhost:8100) ?  Can you please check and make it https:// as for the apps that sign in Personal Microsoft accounts and work and school accounts only HTTPS scheme is allowed.  Also, Adding HTTP URIs for apps that sign in work or school accounts is supported only through the app manifest editor.  Please refer to the Redirect URI/reply URL restrictions and limitations for more details.

    Wednesday, November 13, 2019 6:24 PM

All replies

  • I see you are using http:// in the redirect uri (http://localhost:8100) ?  Can you please check and make it https:// as for the apps that sign in Personal Microsoft accounts and work and school accounts only HTTPS scheme is allowed.  Also, Adding HTTP URIs for apps that sign in work or school accounts is supported only through the app manifest editor.  Please refer to the Redirect URI/reply URL restrictions and limitations for more details.

    Wednesday, November 13, 2019 6:24 PM
  • Hi displayNameo,

    Just checking to see if you were able to get this resolved and if the answer was helpful to you. If so, please remember to mark as answer so that others in the community with similar questions can more easily find an answer.


    Please take a moment to "Mark as Answer" and/or "Vote as Helpful" wherever applicable. Thanks!

    Wednesday, November 13, 2019 11:46 PM
  • Please let us know if you were able to resolve the issue from the replies before. If you still have more questions please let us know with some additional information regarding your question and we'll try to resolve it. It may require additional support escalation if we are unable to resolve this on this msdn thread. 

    If there's no more follow ups in regards to this, I will be marking an answer as answer. If you feel your question has not been answered please let us know anymore pending asks and we can try to follow up accordingly. 

    thanks,

    - Frank H.

    Tuesday, November 26, 2019 8:04 PM
  • I'm following up on this please let us know if there are anymore questions. As it looks like this issue has been resolved within the scope of the MSDN Thread Question, I will be marking the response as answer. Please let me know if your question has not been answered, and I can go ahead and unmark it as answer or feel free to mark it as unanswer yourself. Also please remember to post future questions on the new Q&A Forums here : https://docs.microsoft.com/answers/index.html Thanks
    Wednesday, December 11, 2019 7:07 PM