Apr 01 2022 06:14 AM
Hi,
Im trying to develop a teams app, and an integral part of the app is to be able to copy a string to the clipboad of the user.
The app works fine when viewed in the browser (not as an embedded page within the teams enviroment), but while using it in teams the following error appears:
Microsoft.JSInterop.JSException: The Clipboard API has been blocked because of a permissions policy applied to the current document.
See https://permanently-removed.invalid for more details.
So is there any way to update the clipboard permission policy within our organization?
I really can't seem to find any documentation regarding the Clipboard policy for teams / 365.
Context:
The app is built with Blazor and TeamsFx sdk.
Apr 03 2022 10:37 PM
@OliKIspan - Could you please refer below doc and check if it helps: Clipboard API - Web APIs | MDN (mozilla.org)
Apr 07 2022 06:12 AM
May 04 2022 10:30 AM
May 09 2022 08:32 AM
Solution
This does unfortunately not work, I'm pretty sure the problem is that teams doesn't allow the Clipboard API within the embedded page container.
And i think there currently is no way to get that permission.
May 10 2022 11:48 PM
@OliKIspan -
Technically, this would be supported by the browser Permissions Policy, by adding an option to the allow
attribute of the embedded iframe
.
https://web.dev/async-clipboard/#permissions-policy-integration
Please also refer similar thread: Clipboard API has been blocked because of a Feature Policy applied to the current document. iframe o...
May 09 2022 08:32 AM
Solution
This does unfortunately not work, I'm pretty sure the problem is that teams doesn't allow the Clipboard API within the embedded page container.
And i think there currently is no way to get that permission.