login.microsoftonline.com refused to connect on xFrame

Sriman Ilancheran 6 Reputation points
2022-08-05T17:20:11.57+00:00

Hi All,

I'm facing "login.microsoftonline.com refused to connect" while making a digital signature approval on a document which loads an xFrame to re-authenticate with username and password.
This issue occurs in all of the browsers in our Test environment. Whereas I'm not getting this error on our Dev and Train environments which uses the same SSO configuration.
Note: This issue happens only for Microsoft Azure AD and not with other identity providers.

Microsoft Entra
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,172 questions
{count} vote

3 answers

Sort by: Most helpful
  1. Marilee Turscak-MSFT 36,886 Reputation points Microsoft Employee
    2022-08-08T21:27:14.253+00:00

    Hi @Sriman Ilancheran ,

    This seems to be a known issue with x-frame-options. To prevent clickjacking, login pages are prevented from being displayed inside frames.

    A few things to try:

    Please check if login.microsoftonline.com cookies are blocked. Recent Chrome releases on all platforms and Safari on macOS block or remove cookies.

    Ensure that you have allowed "third party cookies" in the browsers.

    229210-image.png

    Related threads which you may have seen:

    https://stackoverflow.com/questions/40795633/x-frame-option-deny-error-when-aad-sign-in-in-office-add-in

    https://blog.atwork.at/medium.aspx?id=c14c3ae3-3aba-429d-a748-b74283dbd463&date=/post/2020/09/13

    https://learn.microsoft.com/en-us/answers/questions/387682/loginmicrosoftonline-refused-to-connect-from-ifram.html

    Another resolution is to use popups/add-in communication via web sockets in your app to handle the login request: https://learn.microsoft.com/en-us/archive/blogs/richard_dizeregas_blog/connecting-to-office-365-from-an-office-add-in#mastering-the-popup

    Let me know if this helps.

    -

    If the information helped you, please Mark the answer. This will help us and other members of the community as well.

    3 people found this answer helpful.

  2. microsoft8135@my365.ink 0 Reputation points
    2023-08-26T15:45:54.26+00:00

    1234567890


  3. ANUP KUMAR 0 Reputation points
    2023-09-21T17:56:00.35+00:00

    all is good

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.