I added a Microsoft Teams live chat widget to my website. The chat button appears correctly, but clicking it opens an error showing NS_ERROR_DOM_COEP_FAILED. I found a suggestion to add the Cross-Origin-Embedder-Policy header with a value of require-corp in the .htaccess file, but I'm not sure whether that is appropriate or whether another cross-origin setting is interfering. What should I check to get the widget working?
2 Answers
In this case, the fix was to disable or remove the COEP header. The widget was being blocked by the policy, and changing between the available policy values did not resolve it. Removing COEP allowed the cross-origin chat widget to load, and COEP was not required for that particular site.
The error usually points to a conflict with your cross-origin security headers. Although adding Cross-Origin-Embedder-Policy: require-corp can help some embedded resources, a third-party Teams iframe may not work when that policy is enabled. Check both your Cross-Origin-Embedder-Policy and Cross-Origin-Opener-Policy settings, and confirm that your server is actually applying the .htaccess rules.

Related Questions
How to Build a Custom GPT Journalist That Posts Directly to WordPress
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads