I am using the Azure.Identity NuGet to access Graph API for Teams. While debugging the popup comes up fine for logging in, but when I run the dll in a process as part of an application, the browser window doesn't open anymore and fails with exception: general exception. This usually happens due to timeout otherwise, but in this case its because there is no browser pop up which in turn is causing the timeout. I am integrating the code sample they provided here: https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/dev/docs/tokencredentials.md#1-interactivebrowsercredential https://learn.microsoft.com/en-us/dotnet/api/azure.identity.interactivebrowsercredential?view=azure-dotnet Does anyone know how I can allow the popups to show for interactive login in wpf integration of MS graph?
Asked
Active
Viewed 317 times
0
-
Could you share more information on how your UI application (guess WPF based) is calling the sign in logic implementation in your DLL. Have you tried to use MSAL? – Anand Sowmithiran Oct 23 '21 at 17:10
-
Hi @AnandSowmithiran, Well, the Rest call uses the system default browser so there is no code handling for this particular code in UI. – AshleyAsh1990 Oct 26 '21 at 14:48
-
Have you tried to use the approach as described in this [article](https://learn.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-windows-desktop#call-the-microsoft-graph-api-by-using-the-token-you-just-obtained)? It uses the MSAL to do authentication(interactively) and then calls a Graph API, you could build on top of it. – Anand Sowmithiran Oct 26 '21 at 15:22