
Message = "Unsupported User Type 'Unknown'. Mitigation: in the Azure portal, edit the manifest for your application and set the `allowPublicClient` to `true`Ĭatch (MsalClientException ex) when (ex.ErrorCode = "unknown_user_type") Explanation: this can happen if your application was not registered as a public client application in Azure AD AADSTS70002: The request body must contain the following parameter: 'client_secret or client_assertion'. -Ĭatch (MsalServiceException ex) when (ex.ErrorCode = "invalid_client")

NEED USERNAME AND PASSWORD REGISTRATION
Mitigation: check the clientId and the app registration Cause: The clientId in the appsettings.json might be wrong You may have sent your authentication request to the wrong tenant This can happen if the application has not been installed by the administrator of the tenant or consented The following sample presents a simplified case. IPublicClientApplicationcontains the method AcquireTokenByUsernamePassword. NET Core, but not on UWP.įor more information, see Resource Owner Password Credentials (ROPC) with B2C.
NEED USERNAME AND PASSWORD HOW TO
But if you want to use a username and password in interactive scenarios where you provide your own UI, think about how to move away from it. Using a username and password is useful in some cases, such as DevOps scenarios. For more information, see What's the solution to the growing problem of passwords? The preferred flow for acquiring a token silently on Windows domain joined machines is integrated Windows authentication. The username and password flow is not recommended because having your application ask a user for their password isn't secure.

This flow is limited and not recommended, but there are still use cases where it's necessary.

You can also acquire a token by providing the username and password.
