MSExchangeGuru.com

Learn Exchange the Guru way !!!

 

Office 365: “Azure AD Connect Preview” Setup Fails with ADFS Server Bad Password

I was running the Azure AD connect wizard to configure AD sync for a Hybrid deployment and my wizard failed to connect to the ADFS server. I am share as this is a new product and deployment guide does not guide this step.

 

Issue:

I found the following error in the log.

====================================================

An error occurred while executing the ‘Set-MsolAdfsContext’ command. The connection to ADFSServerFQDN Active Directory Federation Services 2.0 server failed due to invalid credentials.

Exception Data (Raw): Microsoft.Online.Deployment.PowerShell.PowerShellInvocationException: An error occurred while executing the ‘Set-MsolAdfsContext’ command. The connection to ADFSServerFQDN Active Directory Federation Services 2.0 server failed due to invalid credentials. —> Microsoft.Online.Identity.Federation.Powershell.FederationException: The connection to ADFSServerFQDN Active Directory Federation Services 2.0 server failed due to invalid credentials.

— End of inner exception stack trace —

at Microsoft.Online.Deployment.PowerShell.PowerShellHelper.InvokeAndThrow(IPowerShell powerShell, Command command, Boolean throwExceptionOnError)

at Microsoft.Online.Deployment.PSModule.Tasks.AAD.CreateAADTrustTask`1.Execute()

at Microsoft.Online.Deployment.Framework.Workflow.WorkflowTask.ExecuteWrapper()

[20:49:00.351] [ 1] [INFO ] Opened log file at path C:UsersPN.G5AppDataLocalAADConnecttrace-20150617-193634.log

===========================================


 

Cause:

This error occurs if Remote PowerShell isn’t enabled on the Active Directory Federation Services (AD FS) federation server. 

Solution:

  1. Login to the ADFS server.
  2. Open Windows PowerShell with Run As Administrator.
  3. Run the following command
    Enable-PSRemoting –force
    

 

Reference: https://support.microsoft.com/en-us/kb/2587730

 

Prabhat Nigam

Microsoft MVP | Exchange Server

Team@MSExchangeGuru

Tweet me @PrabhatNigamXHG

4 Responses to “Office 365: “Azure AD Connect Preview” Setup Fails with ADFS Server Bad Password”

  1. Exchange 2013: Hybrid Part 3 « MSExchangeGuru.com Says:

    […]   « Office 365: “Azure AD Connect Preview” Setup Fails with ADFS Server Bad Password […]

  2. Kenneth Marsner Says:

    I in counted the same problem in a test environment.

    The problem here was the I install Azure AD Connect on the ADFS server. Remote PowerShell uses HTTP (HTTPS), and loopback check prevented the server from calling itself, because AAD Connect uses FQND when it connects via remote PowerShell.

    The solution was to disable Loopback check (Not recommended for production)

    New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name “DisableLoopbackCheck” -value “1” -PropertyType dword -ErrorAction Stop

  3. Prabhat Nigam Says:

    Kenneth
    you already said not recommended for production.

  4. Slava Says:

    Kenneth.

    Your advice saved my life.
    I deployed Azure AD Connect on ADFS server in a test environment and could not find a resolution to that problem…

    Thank you.

Leave a Reply

Categories

Archives

MSExchangeGuru.com