Authentication failure signing in the Developer Portal using Azure AD
After correctly configuring Azure AD integration (as specified here https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-aad) we experienced authentication failures when Azure Active Directory sign-in was selected.
The problem happened to be with custom domain hostname for the Portal. Unless all lowercase letters are used in custom domain hostname, Azure AD sign-in doesn't work and shows message: "Authentication Failed".
The simple solution would be to force all lower case when configuring custom domains either by converting user entered host names to lowercase or preventing users from entering caps.