No action is getting performed when we click on Sign in with Microsoft on Teams mobile , Teams desktop , and web Teams Browser.

Jitendra 0 Reputation points

we are trying to integrate Microsoft Login SSO in TEAMS APP. with both methods


But in LoginPoPup  method it only working in  Browser , when we open teams app Teams desktop, Teams mobile,Teams browser Microsoft login button is not clickable it show "browser Auth error : pop is block by browser".

After that we move to loginRedirect in browser , teamApp mobile login issue is working and but some redirect issue some time happen. But still in desktop version still login button is not clickable. and gives 

Refused to display '
BrowserAuthError: redirect_in_iframe: Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs. (window.parent !== window) => true 

these type error . 

please help us to solve these issue .
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,741 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sayali-MSFT 2,256 Reputation points Microsoft Vendor

    @Jitendra - As per the above error, you cannot authenticate the user inside iframe meaning you cannot use redirect APIs for user interaction with the identity provider.

    You can start with creating your own customer page and allow the user to enter the credentials and then authenticate the user. When the user enters their credentials and clicks on login, the server will return OK (if email/password is correct). After that you should save the token in localstorage and then set isAuthenticated = true.

    If you are using the Auth code flow, then you should do the authentication in the outer real page not inside the iframe. Then you will have to login once your authenticated. The concept is that you must fully redirect to the Auth pages in azure ad not in iframe.

    Reference doc-,redirect%20APIs%20for%20user%20interaction%20with%20the%20IdP%3A