Skip to main content

Notifications

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.

  • Suggested answer
    Bug hunter Profile Picture
    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
    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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 671 Super User 2025 Season 1

#2
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 167 Super User 2025 Season 1

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 138 Most Valuable Professional

Product updates

Dynamics 365 release plans