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
    Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at

    Hi Trevor Helps,

    This is strange but you can try clearing your browser cache or try changing the "X-frame-options" of that website to some other values. Here is the link for different options that you can try: 
    https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options 
    https://credoinfolit.zendesk.com/hc/en-us/articles/360038339213-X-Frame-Options-Set-to-Deny 

  • Suggested answer
    Bug hunter Profile Picture
    7 on at

    Root cause for this issue is, If multiple outlook accounts are logged into a browser,

    even after signing out from the accounts,

    they are cached by browser, In this case when an application with microsoft login starts from salesforce iframe (only in case of multiple MS accounts) opens a popup to pick an account.

    This will get blocked in iframe and further authentication does not happen.

    Resolution steps for edge browser.

    1) click on profile icon and click on Manage profile settings.

    2) Click on 3 dots icon and click on remove button

    Happy coding!!

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 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans