I am in the process of setting up server based authentication with Dynamics 365 on-premise and SharePoint Online. Following the instructions from here: https://technet.microsoft.com/en-us/library/mt171421.aspx?f=255&MSPPError=-2147217396.
When at step 7, running the command "Set-CrmAdvancedSetting -Entity $setting" I receive the following output:
PS C:\Program Files\Microsoft Dynamics CRM\tools> $ServicePrincipalName.Add("$CRMAppId/$RootDomain") PS C:\Program Files\Microsoft Dynamics CRM\tools> Set-MsolServicePrincipal -AppPrincipalId $CRMAppId -ServicePrincipalNames $ServicePrincipalName PS C:\Program Files\Microsoft Dynamics CRM\tools> Add-PSSnapin Microsoft.Crm.PowerShell PS C:\Program Files\Microsoft Dynamics CRM\tools> $setting = New-Object "Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity" PS C:\Program Files\Microsoft Dynamics CRM\tools> $setting.LogicalName = "ServerSettings" PS C:\Program Files\Microsoft Dynamics CRM\tools> $setting.Attributes = New-Object "Microsoft.Xrm.Sdk.Deployment.AttributeCollection" PS C:\Program Files\Microsoft Dynamics CRM\tools> $attribute1 = New-Object "System.Collections.Generic.KeyValuePair[String, Object]" ("S2SDefaultAuthorizationServerPrincipalId", "00000001-0000-0000-c000- 000000000000") PS C:\Program Files\Microsoft Dynamics CRM\tools> $setting.Attributes.Add($attribute1) PS C:\Program Files\Microsoft Dynamics CRM\tools> $attribute2 = New-Object "System.Collections.Generic.KeyValuePair[String, Object]" ("S2SDefaultAuthorizationServerMetadataUrl", "https://accounts.accessc ontrol.windows.net/metadata/json/1") PS C:\Program Files\Microsoft Dynamics CRM\tools> $setting.Attributes.Add($attribute2) PS C:\Program Files\Microsoft Dynamics CRM\tools> Set-CrmAdvancedSetting -Entity $setting Set-CrmAdvancedSetting : Unable to connect to the remote server At line:1 char:1 + Set-CrmAdvancedSetting -Entity $setting + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (Microsoft.Crm.P...AdvancedSetting:SetCrmAdvancedSetting) [Set-CrmAdvancedSetting], WebException + FullyQualifiedErrorId : CRM Deployment Cmdlet Error,Microsoft.Crm.PowerShell.SetCrmAdvancedSetting