'AllowedFrameAncestors' is not valid for Business Central Server

We are trying to show an iframe from Business Central (onprem) inside our D365 for Sales (cloud).

Per default BC does not allow to be used from different servers than the BC server. Unless we specify an AllowedFrameAncestors key in the web servers navsettings.json file.

So I used this Powershell command:

Set-NAVWebServerInstanceConfiguration -KeyName “AllowedFrameAncestors” -WebServerInstance $serverInstance -KeyValue "https:*.crm4.dynamics.com"

But when using it then we the following error in the server event log:

Type: Microsoft.Dynamics.Nav.Types.NavConfigurationException
SuppressMessage: False
ContainsPersonalOrRestrictedInformation: False
DiagnosticsSuppress: False
MessageWithoutPrivateInformation: The configuration setting ‘AllowedFrameAncestors’ is not valid for Microsoft Dynamics 365 Business Central Server.
SuppressExceptionCreatedEvent: False
FatalityScope: None
Message: The configuration setting ‘AllowedFrameAncestors’ is not valid for Microsoft Dynamics 365 Business Central Server.
StackTrace:
at Microsoft.Dynamics.Nav.Types.ServerSettingsBase1.GetSettingDefinition(String settingName)* *at Microsoft.Dynamics.Nav.Management.Cmdlets.GetNavServerConfiguration.InternalValidate()* *at Microsoft.Dynamics.Nav.Management.NavCommand.ProcessRecord()* *Source: Microsoft.Dynamics.Nav.Types* *HResult: -2146233088* *StackTrace:* *at Microsoft.Dynamics.Nav.Types.ServerSettingsBase1.GetSettingDefinition(String settingName)
at Microsoft.Dynamics.Nav.Management.Cmdlets.GetNavServerConfiguration.InternalValidate()
at Microsoft.Dynamics.Nav.Management.NavCommand.ProcessRecord()

BC 13.3.27233 - on-premise

If this error message is correct, then there is something wrong in the documentation.

Hi Erik

I think this questions is to hard for anyone to answer here - Give it a go on Yammer in the Tech-group instead.

I guess you’re right and I did contact Microsoft too. Just hoped that someone had tried using iframes with an onprem BC. [emoticon:c4563cd7d5574777a71c318021cbbcc8]

Microsoft has now confirmed that there is an error with BC, IFRAMEs and AAD. And that the error will be fixed in the next update (May 2019):

https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb/issues/422