Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
Please note that our forum is a public platform. Kindly ensure that you hide any personal or organizational information to protect personal data.
Hi Lalu Prasad
The Invalid BaseDocQuerySignature in appSettings message appears to be raised inside Word for the web during initialization. I would not recommend trying to add or modify a BaseDocQuerySignature setting directly in your application, as this is not a WOPI host configuration parameter documented for customers.
Since the integration was working previously and stopped around the same time as the Node.js, undici, and CSRF changes, I would first verify whether the WOPI host page or the request sent to Microsoft 365 for the web has changed.
According to Microsoft's WOPI host-page requirements, the host should use the WOPI action URL obtained from discovery and submit access_token and access_token_ttl to the Microsoft 365 for the web iframe using an HTTP POST rather than placing the access token in the query string.
For more information, you can refer to:
Set up a host page | Microsoft Learn
PnP-WOPI - Code Samples | Microsoft Learn
I suggest checking the browser Network trace for the failing session and comparing it with the implementation before the recent application changes. In particular, verify:
- The WOPI action URL generated from discovery has not been modified, re-encoded, decoded, or reconstructed unexpectedly.
-
WOPISrcand any query-string parameters are preserved exactly as expected when constructing the action URL. -
access_tokenandaccess_token_ttlare still POSTed correctly by the host page. - The recent CSRF changes are not rewriting, rejecting, or injecting parameters into the form POST.
- The Node.js/
undiciupgrade has not changed URL serialization or query-string encoding. - The WOPI endpoints such as CheckFileInfo, GetFile, and the editing/locking operations are still receiving requests and returning their expected responses. Microsoft's WOPI sample describes the host as consisting of the Office frame plus the WOPI endpoints that Microsoft 365 for the web calls to work with the document.
A particularly useful isolation test would be to temporarily run the previous Node.js/package version or the previous CSRF implementation. If Word begins loading again, that would considerably narrow the problem to a change in how the host page, WOPI URL, or POST data is being generated.
The console also shows Microsoft-hosted Word resources loading successfully, while Word subsequently encounters the BaseDocQuerySignature exception during initialization. Therefore, the BaseDocQuerySignature exception by itself does not establish that the problem is with the Word JavaScript files shown in the stack trace.
If possible, please also capture a HAR/network trace from a session where the issue occurs and check the generated WOPI action URL and the POST payload (with the actual access token removed before sharing). That should help identify whether the problem occurs before Word calls the WOPI endpoints or after communication with the WOPI host begins.
I hope this information helps and look forward to your response.