Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

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

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.

  • Suggested answer
    Bug hunter Profile Picture
    Bug hunter 7 on at
    RE: My iFrame displays login.microsoftonline.com refused to connect - but only SOMETIMES

    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!!

  • Suggested answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 User Group Leader on at
    RE: My iFrame displays login.microsoftonline.com refused to connect - but only SOMETIMES

    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 

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans