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.
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.
did you try docs.microsoft.com/.../getpopupservice www.dancingwithcrm.com/.../ ???
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,902 Super User 2024 Season 2
Martin Dráb 229,316 Most Valuable Professional
nmaenpaa 101,156