web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

My iFrame displays login.microsoftonline.com refused to connect - but only SOMETIMES

(0) ShareShare
ReportReport
Posted on by 95

Our D365 app presents an iframe on a form which loads another website (different domain) which conducts some Q and A then returns to  a 'completed' page which is a D365 webresource html page.

This works most of the time but occasionally we see 'login.microsoftonline.com refused to connect' and in dev tools the error 'Refused to display 'https://login.microsoftonline.com' in a frame because it set 'x-frame-options' to 'deny'.

I could understand if this happens ALL the time but it doesn't - more often than not, it works! Once I see the error, it persists until I log out/in again.

Following the error, I still appear to be logged in and can happily navigate in D365.

Any suggestions greatly appreciated.

I have the same question (0)
  • Suggested answer
    Chevva Profile Picture
    95 on at

    It seems that the OAuth 2.0 acces tokens expire and are renewed in the background but this won't apply to the iframe so attempts to redirect fail as we are no longer logged in. We reworked our code so the iframe uses html5 window.parent.postMessage, rather than attempting to redirect to a D365 webresource.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans