A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation
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
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?
Microsoft Security | Microsoft Authenticator
Microsoft Security | Microsoft Authenticator
Sign in to answer