Outlook add-in works in Outlook Web but not in Desktop app

Anonymous
2025-07-07T08:33:35.2066667+00:00

I'm building an Outlook add-in that loads a task pane using Office.onReady. In Outlook Web, the callback is triggered as expected and Office.context.mailbox is accessible. In Outlook Desktop, although Office and Office.onReady are both defined (typeof Office === 'object', typeof Office.onReady === 'function'), the callback never executes.

What I’ve Tried

  • Confirmed that the task pane is opened via the ribbon button, not by navigating to the URL manually.
  • Verified that the task pane loads visually and all JS files are served successfully via ngrok over HTTPS.
  • Cleared %LOCALAPPDATA%\Microsoft\Office\16.0\Wef\ to remove sideload cache..
  • Checked with console.log that Office and Office.onReady exist in the global scope.

Environment Outlook Desktop on Windows

Manifest host: Mailbox, permission: ReadWriteItem

Office.js from CDN: https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js

Task pane served via ngrok, built with Webpack


Question Why is Office.onReady not triggering in Outlook Desktop even though the environment appears to be correctly set up? How can I ensure the task pane is properly initialized in the Office context?

What I’ve Tried

  • Confirmed that the task pane is opened via the ribbon button, not by navigating to the URL manually.
  • Verified that the task pane loads visually and all JS files are served successfully via ngrok over HTTPS.
  • Cleared %LOCALAPPDATA%\Microsoft\Office\16.0\Wef\ to remove sideload cache.
  • Checked with console.log that Office and Office.onReady exist in the global scope.

Environment Outlook Desktop on Windows

Manifest host: Mailbox, permission: ReadWriteItem

Office.js from CDN: https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js

Task pane served via ngrok, built with Webpack


Question Why is Office.onReady not triggering in Outlook Desktop even though the environment appears to be correctly set up? How can I ensure the task pane is properly initialized in the Office context in Outlook Desktop? Has anyone encountered this issue before or can offer insight into what might be missing?I'm building an Outlook add-in that loads a task pane using Office.onReady. In Outlook Web, the callback is triggered as expected and Office.context.mailbox is accessible. In Outlook Desktop, although Office and Office.onReady are both defined (typeof Office === 'object', typeof Office.onReady === 'function'), the callback never executes.

What I’ve Tried

  • Confirmed that the task pane is opened via the ribbon button, not by navigating to the URL manually.
  • Verified that the task pane loads visually and all JS files are served successfully via ngrok over HTTPS.
  • Cleared %LOCALAPPDATA%\Microsoft\Office\16.0\Wef\ to remove sideload cache..
  • Checked with console.log that Office and Office.onReady exist in the global scope.

Environment Outlook Desktop on Windows

Manifest host: Mailbox, permission: ReadWriteItem

Office.js from CDN: https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js

Task pane served via ngrok, built with Webpack


Question Why is Office.onReady not triggering in Outlook Desktop even though the environment appears to be correctly set up? How can I ensure the task pane is properly initialized in the Office context?

What I’ve Tried

  • Confirmed that the task pane is opened via the ribbon button, not by navigating to the URL manually.
  • Verified that the task pane loads visually and all JS files are served successfully via ngrok over HTTPS.
  • Cleared %LOCALAPPDATA%\Microsoft\Office\16.0\Wef\ to remove sideload cache.
  • Checked with console.log that Office and Office.onReady exist in the global scope.

Environment Outlook Desktop on Windows

Manifest host: Mailbox, permission: ReadWriteItem

Office.js from CDN: https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js

Task pane served via ngrok, built with Webpack


Question Why is Office.onReady not triggering in Outlook Desktop even though the environment appears to be correctly set up?
How can I ensure the task pane is properly initialized in the Office context in Outlook Desktop?
Has anyone encountered this issue before or can offer insight into what might be missing?

Outlook | Windows | Classic Outlook for Windows | For business

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

1 answer

Sort by: Most helpful
  1. Kudos-Ng 15,055 Reputation points Microsoft External Staff Moderator
    2025-07-07T11:27:00.6233333+00:00

    Hi Poonia, Dev Manish, 

    Thank you for posting your question in the Microsoft Q&A forum. 

    From your description, it seems that Office.onReady works as expected in Outlook Web, but not in Outlook Desktop, even though both Office and Office.onReady are defined. To help narrow down the cause, may I ask: 

    • Are you using Classic Outlook or the New Outlook experience on Desktop? 
    • Have you had a chance to test your add-in on both versions? 

    If you're currently using Classic Outlook, here are a few suggestions that may help with troubleshooting: 

    Enable Troubleshooting Logging in Classic Outlook 

    1. Open Outlook and go to File > Options 
    2. Navigate to the Advanced tab 
    3. Scroll down to Other 
    4. Check Enable troubleshooting logging (requires restarting Outlook)  undefined

    Log files will be generated at: %temp%\Outlook Logging  

    You can access this location by pressing Windows + R, pasting the path, and hitting Enter. undefined

    Event-Based Add-ins Consideration 

    I’m not sure if your add-in is using event-based activation, but I came across a helpful article that highlights some important considerations for Classic Outlook: Configure your Outlook add-in for event-based activation - Office Add-ins | Microsoft Learn 

    The article mentions that "When the JavaScript function specified in the manifest to handle an event runs, code in Office.onReady() and Office.initialize isn't run. We recommend adding any startup logic needed by event handlers, such as checking the user's Outlook version, to the event handlers instead." 

    I hope this insight is relevant to your situation and helps clarify why Office.onReady() might not be executing as expected in your case. 

    Create new profile 

    Additionally, you may consider creating a new profile in Outlook to rule out the possibility of corruption or misconfiguration in the current profile. Create a new profile following the instructions here: Create an Outlook profile - Microsoft Support

    Additional Debugging Resource 

    I also found an article for debugging add-ins with runtime logging that you may find this helpful: Debug your add-in with runtime logging - Office Add-ins | Microsoft Learn 

    I hope the information above is useful to you. Please don’t hesitate to come back here if you have any further questions or need additional guidance 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".         

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

    Was this answer helpful?