Hi @Praveen Patel G
Dear Chris Bears.
Good day! Thank you for posting to the Microsoft Community. We are happy to help you!Given your question about creating a HTML web page, and the current forum channel you're posting focuses on Microsoft 365 for Business, especially Exchange Online builds. Therefore, in order to get further dedicated technical support and assistance, to help you better and not waste more time, it is recommended to publish a new thread on the Microsoft Q&A forum with a Microsoft 365 tag https://learn.microsoft.com/en-us/answers/tags/ . Dedicated support engineers there specialize in work related to HTML and will provide you with further assistance with your current goals/deployments.
In the same time i have do some research also via this link: https://learn.microsoft.com/en-us/azure/active-directory-b2c/javascript-and-page-layout?pivots=b2c-user-flow
i think try to modify your CSP directive to explicitly allow the "mailto:" scheme. Here's what you can do:
- Update your CSP header value to include the "mailto:" scheme. You can adjust your CSP directive to allow the "mailto:" scheme as follows:
<add name="Content-Security-Policy" value="default-src 'self'; frame-src 'self' mailto:;">
By adding mailto: to the frame-src directive, you explicitly permit the loading of resources using the "mailto:" scheme within frames.
- Ensure that your CSP settings are correctly applied within your application configuration files. Make sure that the updated CSP header is being delivered by your web server to the client's browser.
- After making these changes, restart your web server, refresh your web application in the Microsoft Teams tab, and then try clicking on the email address link. This should allow the "mailto:" scheme to work within your web application without triggering the CSP violation error.
By explicitly adding the "mailto:" scheme to the CSP directive, you are instructing the browser to allow resources with that scheme to be loaded within your application. if the above step does not work, please contact the dedicated team, they have more knowledge and focus on that kind of issue.
It is recommended to publish a new thread on the Microsoft Q&A forum with a Microsoft 365 tag https://learn.microsoft.com/en-us/answers/tags/ . Dedicated support engineers there specialize in work related to HTML and will provide you with further assistance with your current goals/deployments.
Thanks in advance for your understanding! Your patience and cooperation will be highly appreciated. Hope you all the best!
Sincerely,
Eben | Microsoft Community Moderator