Skip to main content

Notifications

Service | Customer Service, Contact Center, Fie...
Answered

Not able to Open MSAL.js login popup in Field service Mobile app and Teams Desktop

Posted on by Microsoft Employee

I created a PCF solution which have MSAL.js login popup authentication integrated and this PCF is embedded directly inside the field service and field service mobile forms.

Now the MSAL login popup authentication work fine when we use field service in the browser. login popup opens and authentication works smoothly. but If i open the field service mobile app and open my solution, MSAL is not opening dedicated popup inside the field service mobile app instead of it opens inside the default mobile browser. That is causing the problem because after authentication it does not redirect back to the app. hence we are not able to get the access token.

What we can do here to make the MSAL.js login popup to work in inside the field service mobile app?

The same problem is also inside the Teams desktop app. when I collaborate the entityPage where I have embedded the PCF solution inside the Teams Desktop, It does not open the MSAL.js does not work and does not opens Login popup inside Teams Desktop App.If we open the teams inside the browser, It is able to open a login popup.

Alternate approach which I found out is to authenticate the user using Microsoft identity platform and the OAuth 2.0 device authorization grant flow. but I am not really sure that it is the right use case to get access token because according to the MS documentation it allows users to sign in to input-constrained devices such as a smart TV, IoT device, or printer.

  • admishevchenko Profile Picture
    admishevchenko 2 on at
    Not able to Open MSAL.js login popup in Field service Mobile app and Teams Desktop
    Did popupservice helped here? Could you please share some details, as I am currently struggling with the same issue.
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Not able to Open MSAL.js login popup in Field service Mobile app and Teams Desktop

    Thanks for the answer. but we have created a PCF component in reactjs and added msal.js to get the access token which helps us to get access token from aad registration. The popup which i have described in the question is about logged the user and get the access token which all done by Msal.js library. and solution you shared is kind of helping us to create popups in the power apps. We don't want that.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Not able to Open MSAL.js login popup in Field service Mobile app and Teams Desktop

    did you try docs.microsoft.com/.../getpopupservice  www.dancingwithcrm.com/.../ ???

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,902 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,316 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans