Forum Discussion
Mehmet_Ceylan
Aug 31, 2022Copper Contributor
How can I get clipboard permission in Teams add-on app
I'm developing a plugin in Teams
I use clipboard in this plugin, but when I do Clipboard operation, it gives the following error.
There is no clipboard permission in the device permissions section of Teams.
how can i solve this problem
Error Message=Uncaught (in promise) DOMException: The Clipboard API has been blocked because of a permissions policy applied to the current document. See https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-permissions-in-cross-origin-iframes for more details.
- Nivedipa-MSFT
Microsoft
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: https://github.com/instructure/canvas-lms/issues/1767?msclkid=39929f8ad0f411ec8e74e4b807363be9- Bingo_YangCopper Contributorbut Teams app doesn't provide allow attribute.
there is no permission option on manifest. https://learn.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema#permissions
<iframe
src="index.html"
allow="clipboard-read; clipboard-write"
>
</iframe>