I\'m currently trying to integrate with Azure AD using the admin consent flow.
I\'ve set up an app in our domain, set a few permissions on it and am then navigating to t
Daniel Camargo's comment above seems to have done the trick.
When I navigated to the login.microsoftonline.com link I was logging in with the user that created the domain.
If I log in with a test admin user that I created it works as I'd want.
Was having the same problem, and the same after 1 week of work by the azure team, was solved.
My problem was being trying to log in to VSTS with AAD accounts.
I am not convinced that we had exactly the same problem, given that my case was involving a Cordova application, but I will share my scenario anyway:
I created a trial account for my proof of concept and for that I used my personal Microsoft account that I will call mypersonalaccount@outlook.com.
Thus, mypersonalaccount@outlook.com is now part of 2 directories: the outlook.com and my recently created mypersonalaccount.onmicrosoft.com.
When I was trying to authenticate in my Oauth2 application using mypersonalaccount@outlook.com I got that error. My humble guess is that the error is related to some sort of collision between the 2 accounts.
I later created a user1@mypersonalaccount.onmicrosoft.com and a guest account using my gmail account. Everything worked fine with these ones.