Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
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 5 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,392 Super User 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 

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans