AzureAD / microsoft-authentication-library-for-dotnet

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

[Bug] Failure with WAM Error Error Code: 3399614466 Error Message: IncorrectConfiguration #4910

Open shantanukande opened 2 weeks ago

shantanukande commented 2 weeks ago

Library version used

4.64.0

.NET version

v4.0

Scenario

ManagedIdentityClient - managed identity

Is this a new or an existing app?

The app is in production, and I have upgraded to a new version of MSAL

Issue description and reproduction steps

WAMBrokerTestScript.txt

Please change attached txt to linqpad script. Trying to run this script and its failing with following error: {"additional_query_parameters_count":"1","all_error_tags":"7q6cl","api_error_code":"3399614466","api_error_context":"(pii)","api_error_tag":"7q6cl","api_name":"SignInInteractively","api_status_code":"StatusInternal::IncorrectConfiguration","authority_type":"Unknown","authorization_type":"Interactive","broker_app_used":"false","client_id":"489b807a-1037-4f37-8107-9a8a3629a02b","correlation_id":"c515b1b1-5596-4507-89d8-77587b7a5e3d","is_successful":"false","msal_version":"1.1.0+local","msalruntime_version":"0.13.8","original_authority":"https://login.microsoftonline.com/common","read_token_last_error":"missing required parameter","request_duration":"6513","request_eligible_for_broker":"true","start_time":"2024-08-28T16:11:34.000Z","stop_time":"2024-08-28T16:11:40.000Z","ui_event_count":"1","wam_telemetry":"{\"x_ms_clitelem\":\"1,50194,0,1932973.9838,\",\"ui_visible\":false,\"server_error_code\":50194,\"scope\":\"489b807a-1037-4f37-8107-9a8a3629a02b/.default offline_access openid profile\",\"redirect_uri\":\"ms-appx-web://Microsoft.AAD.BrokerPlugin/489b807a-1037-4f37-8107-9a8a3629a02b\",\"provider_id\":\"https://login.windows.net\",\"oauth_error_code\":\"invalid_request\",\"http_status\":400,\"http_event_count\":1,\"http_content_type\":\"application/json; charset=utf-8\",\"http_content_size\":655,\"device_join\":\"haadj\",\"correlation_id\":\"{c515b1b1-5596-4507-89d8-77587b7a5e3d}\",\"client_id\":\"489b807a-1037-4f37-8107-9a8a3629a02b\",\"cache_event_count\":0,\"broker_version\":\"10.0.22621.3958\",\"authority\":\"https://login.microsoftonline.com/common\",\"api_error_code\":-895352830,\"account_join_on_start\":\"primary\",\"account_join_on_end\":\"primary\",\"silent_code\":3399614466,\"silent_bi_sub_code\":0,\"silent_message\":\"AADSTS50194: Application '489b807a-1037-4f37-8107-9a8a3629a02b'(Cayman DataProvider) is not configured as a multi-tenant application. Usage of the /common endpoint is not supported for such applications created after '10/15/2018'. Use a tenant-specific endpoint or configure the application to be multi-tenant. Trace ID: 10d337e8-0818-4187-af2b-8db2dc711500 Correlation ID: c515b1b1-5596-4507-89d8-77587b7a5e3d Timestamp: 2024-08-28 16:11:40Z\",\"silent_mats\":{\"x_ms_clitelem\":\"1,50194,0,1932973.9838,\",\"ui_visible\":false,\"server_error_code\":50194,\"scope\":\"489b807a-1037-4f37-8107-9a8a3629a02b/.default offline_access openid profile\",\"redirect_uri\":\"ms-appx-web://Microsoft.AAD.BrokerPlugin/489b807a-1037-4f37-8107-9a8a3629a02b\",\"provider_id\":\"https://login.windows.net\",\"oauth_error_code\":\"invalid_request\",\"http_status\":400,\"http_event_count\":1,\"http_content_type\":\"application/json; charset=utf-8\",\"http_content_size\":655,\"device_join\":\"haadj\",\"correlation_id\":\"{c515b1b1-5596-4507-89d8-77587b7a5e3d}\",\"client_id\":\"489b807a-1037-4f37-8107-9a8a3629a02b\",\"cache_event_count\":0,\"broker_version\":\"10.0.22621.3958\",\"authority\":\"https://login.microsoftonline.com/common\",\"api_error_code\":-895352830,\"account_join_on_start\":\"primary\",\"account_join_on_end\":\"primary\"},\"silent_status\":5,\"is_cached\":0}","was_request_throttled":"false"}

Verified with other folks and its working fine and just failing for my access.

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

bgavrilMS commented 2 weeks ago

The error message is pretty self explanatory: Application '489b807a-1037-4f37-8107-9a8a3629a02b'(Cayman DataProvider) is not configured as a multi-tenant application. Usage of the /common endpoint is not supported

when you configure authority, use login.microsoftonline.com/TENANT_ID

iulico-1 commented 1 week ago

is "ManagedIdentityClient" part accurate ? Are you trying to sign-in using a managed identity ?

Can you pls share your MSAL integration code ?