You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are continuously addressing and improving the SDK, if possible, make sure the problem persist in the latest SDK version.
Describe the bug
Cosmos DB SDK receives a 401 Unauthorized status code with 5008 sub-status code when CosmosClient is initialized using a TokenCredential (used for Entra ID auth) and the regional database account endpoint.
Assuming that the user has been assigned the correct permissions, after completing the login pop-up, we expect a 404 Not Found to be returned, since the database does not exist on the database account, or 200 if was created already.
Actual behavior
A 401 Unauthorized status code with 5008 sub-status code is received.
Environment summary
SDK Version: 3.46.0
OS Version: Windows
Additional context
For complete stack trace for my account, check Activity ID: 92460b89-3a58-462d-a668-8329d1d2b59c (from Dec. 16th, 2024).
The text was updated successfully, but these errors were encountered:
@ekuhlmann23 couldn't repro the issue when following below steps. Please let me know if you are doing anything different.
Created an account and enable AAD on it using az resource update --resource-group "resourcegroupname" --name "accountname" --resource-type "Microsoft.DocumentDB/databaseAccounts" --set properties.disableLocalAuth=true
Then using console app and dotnet sdk 3.46.0, I tried to access the account and I got 403.
Then gave read and write access to the principal id for accessing the account.
Tried accessing the account again and got 200 response back.
Describe the bug
Cosmos DB SDK receives a 401 Unauthorized status code with 5008 sub-status code when
CosmosClient
is initialized using aTokenCredential
(used for Entra ID auth) and the regional database account endpoint.To Reproduce
Expected behavior
Assuming that the user has been assigned the correct permissions, after completing the login pop-up, we expect a 404 Not Found to be returned, since the database does not exist on the database account, or 200 if was created already.
Actual behavior
A 401 Unauthorized status code with 5008 sub-status code is received.
Environment summary
SDK Version: 3.46.0
OS Version: Windows
Additional context
For complete stack trace for my account, check Activity ID: 92460b89-3a58-462d-a668-8329d1d2b59c (from Dec. 16th, 2024).
The text was updated successfully, but these errors were encountered: