Search code examples
azureauthenticationoauthdotnetnuke

Azure AD: getting the AADSTS50011 error


I've registered a new web app in the https://portal.azure.com and I'm trying to access it through the DNN OAuth provider. Now, I've already added the https://www.dnn.pt/Login to the list of reply urls, but whenever I try to authenticate myself, I end up getting the AADSTS50011 error:

AADSTS50011: The reply address 'https://www.dnn.pt/Login' does not match the reply addresses configured for the application: 'XXXXXXXX'. More details: not specified

Btw, here's what my replyUrls looks like:

"replyUrls": [
   "https://wwww.dnn.pt/Login"
],

And here's the URL that I'm using to get the authentication process rolling (removed the tenant id and app id from the url:

https://login.microsoftonline.com/{tenant id}/oauth2/authorize?scope=email&client_id={app id}&redirect_uri=https%3a%2f%2fwww.dnn.pt%2fLogin&state=Azure&response_type=code

I know that I'm doing something wrong, but can someone please point me in the right direction?

thanks guys!


Solution

  • As mentioned in the comment, you have an extra w in your replyUrls. Since the value mentioned there doesn't match with what's specified in the URL sent for authentication/authorization, you're getting this error.

    Please change the replyUrls to:

    "replyUrls": [
       "https://www.dnn.pt/Login"
    ],
    

    And that should fix the error.