Forms embedded in SharePoint doesn’t display in custom Teams app
I’m working with a customer that is using a custom Teams app instead of Viva Connections for their intranet in Teams. They embed Microsoft Forms in SharePoint News Posts to collect feedback from their users.
The form is embedded as expected when page is rendered in SharePointThe form is embedded as expected when page is rendered in Viva Connections (Viva Petter in screenshot)The form cannot be embedded (error message says “Microsoft Forms | Can’t access the Forms.“) when page is rendered in the custom Teams app (Contoso in screenshot)
I see errors in the console log and network trace related to getting on-behalf-of tokens
{
“odata.error”: {
“code”: “-1, System.AggregateException”,
“message”: {
“lang”: “en-US”,
“value”: “One or more errors occurred.”
}
}
}
I’ve read similar cases
https://github.com/SharePoint/sp-dev-docs/issues/3923#issuecomment-514726341
https://github.com/SharePoint/sp-dev-docs/issues/4357#issuecomment-515131702
https://github.com/SharePoint/sp-dev-docs/issues/9099#issuecomment-1701406090
I have tried allowing more domains in the teams app manifest and I’ve tried deleting and recreating the client credentials for the SharePoint client extensibility app registration without effect.
The customer doesn’t want to use the standard Viva Connections app because of the mobile app experience.
I’ve managed to recreate the issue in several tenants.
Is there a way to make this work in a custom Teams app and how?
I’m working with a customer that is using a custom Teams app instead of Viva Connections for their intranet in Teams. They embed Microsoft Forms in SharePoint News Posts to collect feedback from their users. The form is embedded as expected when page is rendered in SharePointThe form is embedded as expected when page is rendered in Viva Connections (Viva Petter in screenshot)The form cannot be embedded (error message says “Microsoft Forms | Can’t access the Forms.”) when page is rendered in the custom Teams app (Contoso in screenshot)I see errors in the console log and network trace related to getting on-behalf-of tokens https://skodvinhvammen.sharepoint.com/_api/Microsoft.SharePoint.Internal.ClientSideComponent.Token.AcquireOBOToken?resource=%27https://forms.office.com%27&clientId=%2708e18876-6177-487e-b8b5-cf950c1e598c%27 Acquire OBO Token receives the following parameters: clientId: SharePoint Online Web Client Extensibility / SharePoint Online Client Extensibility Web Application Principal (different names in different tenants)resource: https://forms.office.com This API call returns HTTP 500 with unhelpful details {
“odata.error”: {
“code”: “-1, System.AggregateException”,
“message”: {
“lang”: “en-US”,
“value”: “One or more errors occurred.”
}
}
} I’ve read similar cases https://github.com/SharePoint/sp-dev-docs/issues/3923#issuecomment-514726341https://github.com/SharePoint/sp-dev-docs/issues/4357#issuecomment-515131702 https://github.com/SharePoint/sp-dev-docs/issues/9099#issuecomment-1701406090 I have tried allowing more domains in the teams app manifest and I’ve tried deleting and recreating the client credentials for the SharePoint client extensibility app registration without effect. The customer doesn’t want to use the standard Viva Connections app because of the mobile app experience. I’ve managed to recreate the issue in several tenants. Is there a way to make this work in a custom Teams app and how? Read More