Wordjs addin error: Tracking Prevention blocked access to storage for https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js.

Bill King 65 Reputation points
2023-09-19T01:23:43.83+00:00

I have a Word addin deployed in multiple environments using a static web app. The code is identical but in one of the environments I am unable to use cookies to maintain my user sessions I also get the following error

Tracking Prevention blocked access to storage for https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js.

but only when using the desktop application. The online version of Word works as usual.

I have seen a lot of mention of this problem, but there are never any answers. The closest thing to an answer I have found is to add the office code inside a setTimeout call, ie: setTimeout(<officecode>, 1000) but that seems to be releated to a slightly different problem.

Other posts include:
https://learn.microsoft.com/en-us/answers/questions/346968/tracking-prevention-blocked-access-storage-storage?comment=question#newest-question-comment

https://learn.microsoft.com/en-us/answers/questions/1185727/how-to-fix-tracking-prevention-blocked-access-to-s

https://stackoverflow.com/questions/66958068/tracking-prevention-blocked-access-to-storage-for-https-appsforoffice-microsof

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,851 questions
0 comments No comments
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.