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:
-
Login to the ADFS server.
-
Open Windows PowerShell with Run As Administrator.
-
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
June 18th, 2015 at 7:53 pm
[…] « Office 365: “Azure AD Connect Preview” Setup Fails with ADFS Server Bad Password […]
June 26th, 2015 at 4:26 am
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
June 30th, 2015 at 6:27 pm
Kenneth
you already said not recommended for production.
January 21st, 2016 at 3:11 pm
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.