Excel Custom Function works in Excel Online but fails in Excel Desktop with “Network request failed” and no API call made

Rahul Roy Verma 0 Reputation points
2026-01-21T10:44:45.7533333+00:00

I have developed an Excel Web Add-in with a task pane and Custom Functions.

Current behavior:

  • Login and authentication APIs work correctly in both Excel Online and Excel Desktop.
  • The login API is called from taskpane.js and the request is visible in the Network tab.
  • The authentication token is saved successfully after login.

Excel Online:

  • The Custom Function formula successfully calls my backend API.
  • Data is returned and populated in cells as expected.

Excel Desktop (Windows):

  • The same Custom Function fails.
  • The cell shows: "Error: Network request failed".
  • The backend API is never hit.
  • No request appears in the Network tab for the Custom Function API.
  • Only taskpane.js API calls are visible in Network tab.

Technical details:

  • API is HTTPS
  • Domain is listed in <AppDomains> in manifest.xml
  • fetch() is used inside functions.js
  • Authorization header uses Bearer token
  • Same API works when called from task pane

This issue occurs only in Excel Desktop and only for Custom Functions.

Question:

Is this a known limitation or restriction of Custom Functions in Excel Desktop?

Are network requests from Custom Functions blocked or sandboxed differently compared to Excel Online?

Is a proxy via the task pane or another approach required for Desktop Excel?
User's image

Microsoft Security | Microsoft Authenticator

Your answer

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