Search code examples
oauth-2.0azure-active-directoryopenid-connectadal

invalid_client error - Microsoft azure V2 endpoint


i am using V2 endpoint as explained here https://azure.microsoft.com/en-us/documentation/articles/active-directory-v2-scopes/ to connect to Microsoft Login. I am getting invalid client error after i sign in. in fiddler i see following error , can someone please help me.

   AADSTS70002: Error validating credentials. AADSTS50012: Authentication failed
    Trace ID: c62c9e93-f7c9-43fe-b5eb-4a6f9dfe6be0
    Correlation ID: c14f259c-3e91-4e51-9f82-8feabd35bf5d
    Timestamp: 2016-07-22 21:04:19Z

Solution

  • I was receiving the same error and just removing the last forward slash worked for me. Instead of

      https://myapp.com/
    

    I used this

      https://myapp.com 
    

    and invalid_client error went away. It seems the redirect URLs have to exactly match as configured in AZURE AD.