hoe to fix 'an error occured while excuting 'connect-MsolService' command. exception of type microsoft.online.administration.automation.microsoftonlineexception was thrown' error while connecting Azure AD and on-prime AD

haymanot tsegaye 0 Reputation points
2023-09-06T08:58:38.5433333+00:00

Screenshot_7.png

I encountered the above error while connecting on prime and Azure active directory

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
16,665 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sandeep G-MSFT 9,541 Reputation points Microsoft Employee
    2023-09-07T16:40:59.4133333+00:00

    @haymanot tsegaye

    Thank you for posting this in Microsoft Q&A platform.

    This issue may occur for one or more of the following reasons:

    • The Azure Active Directory Module for Windows PowerShell rich client can't connect to the service. This is frequently the result of client computer readiness issues.
    • The user ID that's used to authenticate is single sign-on (SSO)-enabled, and a client computer problem is preventing SSO communication with Active Directory Federation Services (AD FS), with the Azure Active Directory authentication system, or with both.

    You can check below article to fix this issue.

    https://learn.microsoft.com/en-us/microsoft-365/troubleshoot/active-directory/connect-msoservice-throw-exception

    https://learn.microsoft.com/en-us/troubleshoot/azure/active-directory/cannot-connect-cloud-services-powershell

    Let me know if you have any further questions.

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

    0 comments No comments