Skip to content

Connect-MgGraph session isn't shared between PowerShell processes, despite -ContextScope CurrentUser #3587

@cnotin

Description

@cnotin

Describe the bug

I want to authenticate with Connect-MgGraph then benefit from that session in all PowerShell processes (existing and new). Except it doesn't work since Get-MgContext returns nothing and all commands fail like if I wasn't authenticated.

Expected behavior

I can open a powershell, login with Connect-MgGraph, then open a new one or a second existing one, and have access to my session has seen by Get-MgContext or by running any command.

How to reproduce

  1. open a first powershell
  2. login with Connect-MgGraph
  3. open a new powershell
  4. run Get-MgContext or execute any command

SDK Version

  • 2.36.1
  • 2.25.0
  • 2.22.0

Latest version known to work for scenario above?

I don't recall :( But I remember it worked with an older version so I downgrade to 2.25.0 and even to 2.22.0 but still the same issue so it's perhaps something else 🤔

Known Workarounds

Re-auth in each powershell but it's annoying

Debug output

Click to expand log
PS > Connect-MgGraph -TenantId <redacted> -Scopes "Application.ReadWrite.All" -ContextScope CurrentUser -Debug
DEBUG: InteractiveBrowserCredential.GetToken invoked. Scopes: [ Application.ReadWrite.All ] ParentRequestId:
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] MSAL MSAL.CoreCLR with assembly version '4.82.1.0'. CorrelationId(fd3082d1-6bfc-4266-8ec6-a193b24b6238)
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] LoginHint provided: False
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] Account provided: True
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] ForceRefresh: False
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238]
=== Request Data ===
Authority Provided? - True
Scopes - Application.ReadWrite.All
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - True
HomeAccountId - False
CorrelationId - fd3082d1-6bfc-4266-8ec6-a193b24b6238
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:
FMI Path:
Credential FMI Path:

DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] === Token Acquisition (SilentRequest) started:
         Scopes: Application.ReadWrite.All
        Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] Broker is configured and enabled, attempting to use broker instead.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [Runtime] Broker supported OS.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] Can invoke broker. Will attempt to acquire token with broker.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0001]     INFO    SetAuthorityUri:78      Initializing authority from URI 'https://login.microsoftonline.com/<redacted>.onmicrosoft.com/' without authority type, defaulting to MsSts
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    LogTelemetryData:456    Printing Telemetry for Correlation ID: fd3082d1-6bfc-4266-8ec6-a193b24b6238
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    LogTelemetryData:464    Key: start_time, Value: 2026-04-22T22:08:06.000Z
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    LogTelemetryData:464    Key: api_name, Value: ReadAccountById
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    LogTelemetryData:464    Key: was_request_throttled, Value: false
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    LogTelemetryData:464    Key: authority_type, Value: Unknown
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    LogTelemetryData:464    Key: msal_version, Value: 1.1.0+local
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    LogTelemetryData:464    Key: correlation_id, Value: fd3082d1-6bfc-4266-8ec6-a193b24b6238
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    LogTelemetryData:464    Key: broker_app_used, Value: false
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    LogTelemetryData:464    Key: stop_time, Value: 2026-04-22T22:08:06.000Z
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    LogTelemetryData:464    Key: msalruntime_version, Value: 0.19.4
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    LogTelemetryData:464    Key: is_successful, Value: true
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    LogTelemetryData:464    Key: request_duration, Value: 0
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    SetCorrelationId:259    Set correlation ID: fd3082d1-6bfc-4266-8ec6-a193b24b6238
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    EnqueueBackgroundRequest:1032   The original authority is 'https://login.microsoftonline.com/<redacted>.onmicrosoft.com'
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    ModifyAndValidateAuthParameters:200     Additional query parameter added successfully. Key: '(pii)' Value: '(pii)'
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    ModifyAndValidateAuthParameters:200     Additional query parameter added successfully. Key: '(pii)' Value: '(pii)'
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     INFO    ModifyAndValidateAuthParameters:223     Authority Realm: <redacted>.onmicrosoft.com
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0002]     WARNING TryEnqueueMsaDeviceCredentialAcquisitionAndContinue:1084        MsaDeviceOperationProvider is not available. Not attempting to register the device.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    SendHttpRequest:106     Completed HTTP request to '(pii)' with status code 200, downloaded 1964 characters and 13 headers.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    SetCanonicalRealm:1253  Normalize realm to: '554e6116-7680-47a1-b503-16d701aa69c1'
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    TryUseStorage:148       Try to read account from universal storage.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    StorageTokenResponse:84 StorageTokenResponse account constructor invoked. This is only expected in Runtime flows
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:456    Printing Telemetry for Correlation ID: fd3082d1-6bfc-4266-8ec6-a193b24b6238
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: start_time, Value: 2026-04-22T22:08:06.000Z
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: api_name, Value: AcquireTokenSilently
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: was_request_throttled, Value: false
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: authority_type, Value: AAD
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: access_token_expiry_time, Value: 2026-04-22T23:05:55.000Z
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: read_token, Value: ID|AT
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: msal_version, Value: 1.1.0+local
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: client_id, Value: 14d82eec-204b-4c2f-b7e8-296a70dab67e
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: correlation_id, Value: fd3082d1-6bfc-4266-8ec6-a193b24b6238
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: broker_app_used, Value: false
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: stop_time, Value: 2026-04-22T22:08:06.000Z
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: msalruntime_version, Value: 0.19.4
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: original_authority, Value: https://login.microsoftonline.com/<redacted>.onmicrosoft.com
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: additional_query_parameters_count, Value: 2
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: http_call_count, Value: 1
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: last_http_response_code, Value: 200
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: normalized_realm, Value: 554e6116-7680-47a1-b503-16d701aa69c1
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: storage_read, Value: DAC|DAT|DID
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: auth_flow, Value: AT
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: is_successful, Value: true
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: authorization_type, Value: WindowsIntegratedAuth
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:464    Key: request_duration, Value: 33
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:469    Printing Execution Flow:
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [MSAL:0003]     INFO    LogTelemetryData:477    {"t":"4s7uc","tid":2,"ts":0,"l":2},{"t":"4sufd","tid":2,"ts":0,"s":2,"l":2},{"t":"4swgg","tid":2,"ts":0,"s":1,"l":2},{"t":"4swgf","tid":2,"ts":0,"s":1,"l":2},{"t":"4swgi","tid":3,"ts":1,"s":1,"l":2},{"t":"8b2yn","tid":3,"ts":1,"l":2},{"t":"8dqkx","tid":3,"ts":1,"l":2},{"t":"8dqkj","tid":3,"ts":1,"l":2},{"t":"6xuak","tid":3,"ts":1,"l":2},{"t":"8dqlz","tid":3,"ts":1,"l":2,"a":1,"ie":0},{"t":"7fv1c","tid":3,"ts":28,"l":2,"a":1,"ie":1},{"t":"4q2di","tid":3,"ts":29,"l":2},{"t":"4qnng","tid":3,"ts":29,"l":2,"a":2,"ie":0},{"t":"4qnnf","tid":3,"ts":30,"l":2,"a":2,"ie":1},{"t":"8dqit","tid":3,"ts":30,"l":2},{"t":"8b2ht","tid":3,"ts":30,"l":2},{"t":"4qnno","tid":3,"ts":30,"l":2,"a":2,"ie":0},{"t":"4qnnn","tid":3,"ts":32,"l":2,"a":2,"ie":1},{"t":"6xuag","tid":3,"ts":33,"l":2}
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [RuntimeBroker] WAM response status success
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] Checking MsalTokenResponse returned from broker.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] Success. Response contains an access token.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] Checking client info returned from the server..
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] Saving token response to cache..
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] [Instance Discovery] Instance discovery is enabled and will be performed
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] Fetching instance discovery from the network from host login.microsoftonline.com.
DEBUG: Request [5327f980-9d4d-43bb-b015-a7b108df2304] GET https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=REDACTED
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-OS:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
x-ms-client-request-id:5327f980-9d4d-43bb-b015-a7b108df2304
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity.Broker/1.4.0 (.NET 10.0.5; Microsoft Windows 10.0.26200)
client assembly: Azure.Identity.Broker
DEBUG: Response [5327f980-9d4d-43bb-b015-a7b108df2304] 200 OK (00.1s)
Cache-Control:max-age=86400, private
Strict-Transport-Security:REDACTED
X-Content-Type-Options:REDACTED
Access-Control-Allow-Origin:REDACTED
Access-Control-Allow-Methods:REDACTED
P3P:REDACTED
client-request-id:REDACTED
x-ms-request-id:d4bfaeaf-34de-4e5e-8bfb-e7c481b10600
x-ms-ests-server:REDACTED
x-ms-srs:REDACTED
Content-Security-Policy-Report-Only:REDACTED
X-XSS-Protection:REDACTED
Set-Cookie:REDACTED
Date:Wed, 22 Apr 2026 22:08:06 GMT
Content-Type:application/json; charset=utf-8
Content-Length:965

DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [Internal cache] Clearing user token cache accessor.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] [SaveTokenResponseAsync] Saving Id Token and Account in cache ...
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [Internal cache] Total number of cache partitions found while getting refresh tokens: 8. PartitionKey  False
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [Internal cache] Total number of cache partitions found while getting access tokens: 8
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [Internal cache] Total number of cache partitions found while getting refresh tokens: 8. PartitionKey  False
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z] [Internal cache] Total number of cache partitions found while getting accounts: 8. PartitionKey  False
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238]
        === Token Acquisition finished successfully:
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238]  AT expiration time: 22/04/2026 23:05:54 +00:00, scopes: AgentIdentity.Read.All AgentIdentity.ReadWrite.All AgentIdentityBlueprint.AddRemoveCreds.All AgentIdentityBlueprint.Create AgentIdentityBlueprint.Read.All AgentIdentityBlueprint.ReadWrite.All AgentIdentityBlueprintPrincipal.Create AgentIdentityBlueprintPrincipal.Read.All AgentIdentityBlueprintPrincipal.ReadWrite.All Application.Read.All Application.ReadWrite.All AppRoleAssignment.ReadWrite.All AuditLog.Read.All DelegatedPermissionGrant.ReadWrite.All Directory.Read.All Directory.ReadWrite.All Domain.ReadWrite.All email OnPremDirectorySynchronization.Read.All openid Policy.Read.All Policy.ReadWrite.AuthenticationMethod Policy.ReadWrite.Authorization Policy.ReadWrite.ConditionalAccess profile RoleManagement.ReadWrite.Directory User.EnableDisableAccount.All User.Read User.Read.All User.ReadWrite.All. source: Broker
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] Fetched access token from host login.microsoftonline.com.
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238]
[LogMetricsFromAuthResult] Cache Refresh Reason: NotApplicable
[LogMetricsFromAuthResult] DurationInCacheInMs: 29
[LogMetricsFromAuthResult] DurationTotalInMs: 430
[LogMetricsFromAuthResult] DurationInHttpInMs: 143
DEBUG: False MSAL 4.82.1.0 MSAL.CoreCLR .NET 10.0.5 Microsoft Windows 10.0.26200 [2026-04-22 22:08:06Z - fd3082d1-6bfc-4266-8ec6-a193b24b6238] TokenEndpoint: ****
DEBUG: InteractiveBrowserCredential.GetToken succeeded. Scopes: [ Application.ReadWrite.All ] ParentRequestId:  ExpiresOn: 2026-04-22T23:05:54.7895213+00:00
Welcome to Microsoft Graph!

[...]

NOTE: Sign in by Web Account Manager (WAM) is enabled by default on Windows systems and cannot be disabled when using the default ClientId.
To disable WAM run Set-MgGraphOption -DisableLoginByWAM $true and then use a custom ClientId.

ContextScope is correctly set to CurrentUser

PS > (Get-MgContext).ContextScope
CurrentUser

Configuration

  • $PSVersionTable: reproduced on both 5.1.26100.8115 and 7.6.0
  • Windows 11 25H2 (26200.8246)
  • x64
  • With and without WAM

Other information

Perhaps WAM?
Edit: I managed to disable WAM in this version and the behavior remains

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions