Azure AD connect installation failed with "Unable to retrieve the Azure Active Directory configuration."

Jz 0 Reputation points
2024-06-19T17:50:12.53+00:00

Hi, I got following error when installing Azure AD connect:

Unable to retrieve the Azure Active Directory configuration. Exception of type ‘Microsoft.Online.Administration.Automation.MicrosoftOnlineException’ was thrown.

I was able to log into azure portal with my account from browser on the same system.

The window server is " Microsoft Windows NT 10.0.14393.0"

Can you please help?

Thankis!

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Navya 20,100 Reputation points Microsoft External Staff Moderator
    2024-06-20T08:58:38.7866667+00:00

    Hi @Jz

    Thank you for posting this in Microsoft Q&A.

    As I understand that you are facing an issue while installing Azure AD connect. You are getting an error message "Unable to retrieve the Azure Active Directory configuration. Exception of type ‘Microsoft.Online.Administration.Automation.MicrosoftOnlineException’ was thrown."

    Using graph explorer, can you check the authorization policy in Azure AD by using Get authorization policy method and check if "blockMsolPowerShell" equals True. When blockMsolPowerShell policy setting is True, any MSOL command will be denied access.

    For your reference: Get authorizationPolicy

    GET https://graph.microsoft.com/v1.0/policies/authorizationPolicy
    

    To resolve this issue, you will have to allow MSOL PowerShell by setting blockMsolPowerShell setting to False, using the following Update authorizationPolicy request:

    For your reference: Update authorizationPolicy

    User's image

    Hope this helps. Do let us know if you any further queries. If the issue still persists, feel free to post back.

    Thanks,

    Navya

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.