Cant log into newly registered AAD application. Error code: AADSTS650051: Says my organization is in an umanaged state

Viewed 1045

So I have registered a new multi-tenant AAD application but trying to log in using the same account I created it with gives me the error

MSAL.Desktop.4.5.0.0.MsalServiceException: 
    ErrorCode: invalid_client
Microsoft.Identity.Client.MsalServiceException: 
AADSTS650051: "Using application 'TestApplication' is currently not supported for your organization sample-company.ch  because it is in an unmanaged state. An administrator needs to claim ownership of the company by DNS validation of sample-company.ch before the application TestApplication can be provisioned."

The domain name in question is already verified, so im not sure whats wrong here. After registering the app I just followed their Windows Desktop App Quickstart Guide and tried logging in with their sample project https://github.com/Azure-Samples/active-directory-dotnet-desktop-msgraph-v2/

Any help would be appreciated

1 Answers

Since your application is for multi-tenant, you probably didn't do user or admin consent for the target tenant.

Try to add &prompt=admin_consent in your request to force admin consent. Log in with an admin account to do admin consent.

Please see details from Understand user and admin consent.

Related