CommunityToolkit / Graph-Controls

Set of Helpers and Controls for Windows development using the Microsoft Graph.
https://docs.microsoft.com/en-us/windows/communitytoolkit/graph/overview
Other
155 stars 39 forks source link

MsalProvider unable to update authticated state #210

Closed aiguoli closed 1 year ago

aiguoli commented 1 year ago

Describe the bug

I am developing a WinUI 3 project. When using MsalProvider for authentication, the State is always SignedOut, even though I am able to retrieve the ID using provider.CurrentAccountId and able to use various Graph services.

Regression

No response

Reproducible in sample app?

Steps to reproduce

// ViewModel.cs
public astnc Task DoSomething() 
{
    IProvider provider = ProviderManager.Instance.GlobalProvider;
    GraphServiceClient graphClient = provider.GetClient();
    var files = await graphClient.Me.Drive.Items[_parentItemId].Children.Request().GetAsync();
}

Expected behavior

the State should immediately change to SignedIn after logging in.

Screenshots

image image

Windows Build Number

Other Windows Build number

No response

App minimum and target SDK version

Other SDK version

windows10.0.19041.0

Visual Studio Version

2022

Visual Studio Build Number

17.6.0

Device form factor

Desktop

Nuget packages

CommunityToolkit.Authentication 7.1.4 CommunityToolkit.Authentication.Msal 7.1.4 CommunityToolkit.Graph 7.1.4 CommunityToolkit.Mvvm 8.2.1 CommunityToolkit.WinUI.UI 7.1.2 Microsoft.Extensions.DependencyInjection 7.0.0 Microsoft.WindowsAppSDK 1.3.230602002 Microsoft.Windows.SDK.BuildTools 10.0.22621.756

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item.

ghost commented 1 year ago

Hello aiguoli, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

ghost commented 1 year ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

Hello aiguoli, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

ghost commented 1 year ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

ghost commented 1 year ago

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.