Monthly Archives: May 2017

PowerShell issue Dynamics CRM & 365 IFD

I was trying to onfigure a Dynamics 365 server to enable federated claims.

$ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
$ClaimsSettings.Enabled = $true
Set-CrmSetting -Setting $ClaimsSettings

But got this error>

Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.

PS C:\Windows\system32> Add-PSSnapin Microsoft.Crm.PowerShell
PS C:\Windows\system32> $ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
Get-CrmSetting : The underlying connection was closed: An unexpected error occurred on a send.
At line:1 char:19
+ $ClaimsSettings = Get-CrmSetting -SettingType OAuthClaimsSettings
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (Microsoft.Crm.P…rmSettingCmdlet:GetCrmSettingCmdlet) [Get-CrmSetting
], WebException
+ FullyQualifiedErrorId : CRM Deployment Cmdlet Error,Microsoft.Crm.PowerShell.GetCrmSettingCmdlet

The solution was to fix the Web Address properties of the CRM server in CRM Deployment Manager. These Web Addresses were not the same as the address of our IFD deployment.

I found the solution here: (Thanks!)