0
votes

I'm trying to follow this guide so that I can authenticate to my OneDrive account, but I get the following error:

The provided value for the input parameter 'redirect_uri' is not valid. The expected value is 'https://login.live.com/oauth20_desktop.srf' or a URL which matches the redirect URI registered for this client application.

Steps I took:

  1. Registered a New app
  2. gave it a name
  3. chose the web platform
  4. specified https://localhost as the redirect URI
  5. pressed save
  6. created this url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d0adff4f-bcae-4a69-80a7-8a3328a6cf89&scope=openid+profile&response_type=id_token&redirect_uri=https://localhost&nonce=49458204719374587149482
  7. pasted url into browser and pressed enter
  8. a login page appears with my app name and I select my account to login with. I'm then redirect and shown the "redirect_uri" is not valid message

Any idea why I'm not getting a token response back?

1
When you created app in Azure AD what did you specify as redirect_uri? Was it https://localhost?curtisp
Yes. I've tried several different variations for the redirect_uri. localhost, localhost, and even deployed to a live azure urlBlake Erickson
I'm voting to close this question as off-topic because it is a customer support issue not involving programming.Rob

1 Answers

-2
votes

Try https://localhost/somepath instead of https://localhost Or you can even use http instead https, but provide some path or html page after localhost.