Office.js web add-in throws HTTP 401 Unauthorized
- The API call throws, the following HTTP error: “The remote server returned an error: (401) Unauthorized”
- We looked at the add-in code, we see that they’re calling the above method more times (5+ times) – as they’re crossing the limit that we set with Office.js. In the above scenario, the method’s limit is set as 3. Refer the documentation and check the Table # 4. So there is a limit of the number of simultaneous asynchronous calls at any one time, as browsers allow only a limited number of asynchronous calls to servers.
- It’s not just the above API call where the limit/cap exists, check in Table # 4 (refer “asynchronous calls” feature in it).
Hope this helps.