Monday, April 18, 2022

Lesson Learned #197: Getting the error "Could not discover a user realm" using AAD

We used to have cases when our customers are getting the following error"Could not discover a user realm." when they tried to connect using Azure Active Directory in Integrated using a .NET Framework. 


This issue is related that Azure Active Directory Domain Services (Azure AD DS) and Azure Active Directory are not federated and for that reason Integrated security is not able to be used at this stage.


In this situation, you need to discuss with you Azure AD Administrator or using other alternatives from your .NET application like Active Directory Password, with the following connection string,,1433;Authentication=Active Directory Password;Database=myDataBase;UID=myUser@myDomain;PWD=myPassword and the connection will work.



Posted at