Karthik Addagarla
Karthik Addagarla

Reputation: 1

UWP App : MSAL User Account Selection Prompt won't appear in HoloLens

I have a UWP app that user Graph API to authenticate users - created using the sample from: https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-desktop-app-uwp-sign-in

The App works fine when I test on my PC however, while testing with HoloLens, the Account Selection Prompt won't show and the App freezes. I did a troubleshooting and noticed that the App handles when 'AcquireTokenInteractive' is called:

authResult = await PublicClientApp.AcquireTokenInteractive(scopes)
                   .ExecuteAsync()
                   .ConfigureAwait(false);

The sample app runs well in HoloLens (i.e. I can select the User from the account prompt and get the Access token) - The issue happens only with my app in HoloLens. On Dekstop, my app works fine.

Trial-1: I tried using getting redirectUri from 'WebAuthenticationBroker'

string sid = Windows.Security.Authentication.Web.WebAuthenticationBroker.GetCurrentApplicationCallbackUri().Host.ToUpper();

and also manually defining it but that didn't solve the issue.

Trial-2: I tried to bring the Sample Projects MainPage.xaml and MainPage.xaml.cs as-is in my project and still cant see the User Account Selection Prompt appearing in HoloLens (the sample project works fine in HoloLens)

I've ensured all the capabilities are correctly defined. So not sure what must be causing this issue and that too only for my project.

Expected Result: text

When we select 'CallGraphButton_Click()' button, we must see a User Account Selection prompt - when the user launches the app the first time.

Upvotes: 0

Views: 69

Answers (0)

Related Questions