0 votes
1 view
in Azure by (13k points)

I was trying to authenticate with Azure AD using this command:

$AzureADCred = Get-Credential -Message "Cred to connect to AD"

Connect-AzureAD -Credential $AzureADCred

But this will returns only my Account, subscription name, TenantID and Account type. And it shows this error:

Get-AzureADDomain : Error occurred while executing GetDomains

Code: Authentication_Unauthorized

Message: User was not found

Can anyone help me with this?

1 Answer

0 votes
by (26.4k points)

If you are using a guest user then this will not work. So, to resolve this issue your command should be like this:

Connect-AzureAD -Credential $AzureADCred -TenantId "<your TenantId>"

I hope this will help.

Want to become an Azure expert? join azure certification now!!

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...