logo
search
Outlook Error Codes

How to Fix Outlook Calendar JSON Parsing Error When Publishing an Iframe

Phi Hung VoPhi Hung Vo Sep 29, 2026 869 views

Question details

The user needs to resolve an 'Unexpected end of JSON input' error that occurs when trying to publish and embed an Outlook calendar on a website using an iframe.

How to Fix Outlook Calendar JSON Parsing Error When Publishing an Iframe
Product
Microsoft Outlook
Device & OS
not provided
Scenario
Publishing an Outlook calendar to a webpage via an HTML iframe embed code.
Observed behavior
The embedded calendar fails to load, returning the error message 'GetAnonymousCalendarSessionData failed: Unexpected end of JSON input'. Creating a new mailbox or calendar does not resolve the issue.
Before you start

Ensure you have access to the exact HTML link generated by Outlook on the web and verify that your website platform allows external iframes to be embedded without automatically stripping out parameters.

Solution 1Recommended

Verify Calendar URL and Recreate Embed Code

Rule out iframe syntax errors or website script conflicts by testing the raw calendar link and generating clean embed code.

Often, the JSON parsing error is triggered by custom scripts on your website interfering with the iframe, or an improperly formatted embed URL. Testing the link in an isolated environment helps determine if the issue is with the website or Microsoft's servers.

1
Copy the raw HTML link

Go to Outlook on the web, navigate to Settings > Calendar > Shared calendars. Under 'Publish a calendar', select your calendar and permissions, then copy the generated HTML link.

2
Test in a private browser

Paste the copied HTML link directly into the address bar of a private or incognito browser window. If the calendar loads correctly here, the issue lies with your website's iframe implementation.

3
Recreate the iframe code

Write a clean HTML iframe tag: `<iframe src="YOUR_URL_HERE" width="100%" height="600" frameborder="0"></iframe>`. Do not add any custom JavaScript or redirect scripts to the page hosting this iframe.

4
Test on a blank webpage

Upload a plain HTML file containing only your newly created iframe code to your server. If it works, gradually add back your website's CSS and scripts to identify what is causing the JSON data to break.

Verify Calendar URL and Recreate Embed Code
Isolating the issue: If the raw HTML link fails to load even when pasted directly into a private browser, the problem is entirely on Microsoft's server side.
Free Microsoft Office alternative

Looking for a Lightweight, Bug-Free Office Suite?

If you are tired of dealing with server-side errors and complex troubleshooting in Microsoft Office services, consider switching to WPS Office. It provides a lightweight, highly compatible, and completely free alternative for your daily document, spreadsheet, and presentation tasks.

  1. 1. Download and Install: Visit the official WPS website to download the free installer and follow the simple on-screen instructions to set it up on your device.
  2. 2. Open Your Existing Files: Launch WPS Office and directly open any Microsoft Office files. They will display perfectly with complete formatting compatibility.
  3. 3. Enjoy Seamless Productivity: Use Writer, Spreadsheets, and Presentation to manage your daily workload in one single, lightweight application window.
Fully compatible with Microsoft Office file formats including .docx, .xlsx, and .pptxLightweight installation with blazing fast startup timesFamiliar, tabbed user interface ensuring a zero-learning-curve transitionBuilt-in PDF editing tools and seamless cloud synchronization
microsoft office alternative - wps office

Frequently Asked Questions

Why does the 'Unexpected end of JSON input' error happen in Outlook?

This error occurs when the browser receives incomplete or improperly formatted data from the Outlook server. It is often caused by a backend glitch in Microsoft's anonymous calendar publishing service, or interference from custom scripts on the webpage where the iframe is embedded.

Will creating a new Outlook mailbox fix the calendar publishing error?

Not necessarily. If the problem is caused by a tenant-wide server issue or an incompatible website iframe setup, creating a new mailbox or generating a new calendar will often result in the exact same error.

Can I use third-party calendar plugins instead of an iframe?

Yes. If direct HTML publishing via iframe continues to fail, you can use a calendar syncing tool or a third-party website plugin. These tools connect to your Outlook calendar via the Microsoft Graph API, which is typically much more stable than anonymous HTML publishing.