Content Security Policy errors in Safari
Category
- [ ] Question
- [ ] Typo
- [x] Bug
- [ ] Additional article idea
Expected or Desired Behavior
For Safari to work without 50+ errors :)
Observed Behavior
When loading a modern page from SPO Safari gives a ton of errors regarding Content Security Policy. We've seen this issue in the past but it was fixed. As of this morning it seems to have returned on at least 3 separate tenants (we can send tenant URL if wanted).

~~I also experience issues login into ms-graph-client on SPFx, but I'm not sure if this issue is related as my coworker can login just fine using his Mac + Safari. I get an error AADSTS50058, but it loads fine using Private? Just adding in case it is related.~~ Nevermind, this has been solved. Main issue remains.
Steps to Reproduce
Login to your favorite SPO tenant, navigate to the SharePoint landing page and open the Web Inspector.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Well that's a bit weird. Can you look at the response headers of the main page and see what the CSP report header policy is and paste it here?
I see the same in Safari.
Content-Security-Policy-Report-Only: script-src 'strict-dynamic' 'unsafe-eval' 'nonce-afde21ba-1ce4-48c1-b377-2174f30ff367' ; report-uri https://splst.sharepoint.com/sites/SPHubDiscussions/_layouts/15/CSPReporting.aspx
OK - so it makes sense that the report would fire, since Safari apparently has no idea what CSP3 is. The strange this is why would you only notice it now (unless safari rolled out then rolled back support). I'm currently working on updating the CSP code, so I'll make note of Safari (and IE) getting confused.
@patmill - from my side - I open Safari dev tools once in few months :) So I noticed it after reading this issue :)
I see the same CSP as Alex, no change yet, glad that it at least makes sense :)
I also don't really use Safari as my daily dev browser, I noticed it yesterday because I got some other bug reports that needed looking into. I was seeing the issue in Safari 12.1 and it remains after updating to 12.1.1
Thanks for the quick reply btw!
@patmill Any chance for an ETA on this? The issue still occurs and I would like to know what to tell our customers :)
same problem here, using Safari as default browser for all users, lots of pages not loading properly. For instance modern site contents pages remain blank, file viewer web parts not working with Word or PDF files.
Any updates on this? I am also seeing many content security errors!! I get around 50.
Any updates, please? I'm also seeing many content security policy errors. I'm also experiencing an issue where the SPFx web parts using the Office Graph API are not working in Safari and I wonder if this is related?
SPFx web parts are working for us in Safari but there are still a lot of Content Security Policy errors. Any updates please?
This issue is being closed as part of an issue list cleanup project. Issues with no activity in the past 6 months that aren't tracked by engineering as bugs were closed as part of this inititive. If this is still an issue, please follow the steps outlined to re-open or submit a new issue.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues