AzureAD / microsoft-authentication-library-for-dotnet

Microsoft Authentication Library (MSAL) for .NET
https://aka.ms/msal-net
MIT License
1.36k stars 330 forks source link

[Bug] Issue with Single Sign-On (SSO) Implementation #4741

Closed JineshKamdar98 closed 1 month ago

JineshKamdar98 commented 1 month ago

Library version used

4.43.0.0

.NET version

.NET Framework 4.8

Scenario

PublicClient - desktop app

Is this a new or an existing app?

None

Issue description and reproduction steps

Hello everyone,

I'm encountering an issue with the implementation of Single Sign-On (SSO) in our WPF application, and I'd appreciate some guidance or insights from the community.

Here's a breakdown of our setup:

We've managed to achieve this integration successfully. However, we encountered a roadblock when attempting to implement automatic login in the WPF application under specific conditions. More specifically:

We aim to automate the login process in the WPF application if a certain flag, let's call it "SingleSignOnUser," is set to True by the user. This is accomplished using the AcquireTokenSilent API provided by PublicClientApplication. The issue arises when calling AcquireTokenSilent: it doesn't display any prompts at the start of the WPF application and logs in automatically, and we're unable to achieve Single Sign-On (SSO) functionality in the hosted web application.

It's important to note that we retain the user data folder in its path, and we're not deleting it along with the cache. Has anyone else encountered a similar issue, or perhaps have insights into what might be causing this behavior? Any assistance or suggestions would be greatly appreciated!

Thank you in advance for your help.

Relevant code snippets

No response

Expected behavior

No response

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

No response

neha-bhargava commented 1 month ago

Duplicate of https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/4739