Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] MSI cloud shell the error message is not parsed from the error response. #4402

Closed
neha-bhargava opened this issue Oct 31, 2023 · 0 comments · Fixed by #4643
Closed

Comments

@neha-bhargava
Copy link
Contributor

Library version used

NA

.NET version

Net 6

Scenario

ManagedIdentityClient - managed identity

Is this a new or an existing app?

This is a new app or experiment

Issue description and reproduction steps

The error response for cloud shell is different and needs to be handled differently to get the error message.

Currently for managed identity error response we only look at the top level for error message and error response. For cloud shell the error message is one level down in the json.

Sample error response from cloud shell when a wrong scope is passed.

"{\"error\":{\"code\":\"AudienceNotSupported\",\"message\":\"Audiencehttp://management.azure.comisnotasupportedMSItokenaudience.Supportedaudiences:https://management.core.windows.net/,https://management.azure.com/,https://graph.windows.net/,https://vault.azure.net,https://datalake.azure.net/,https://outlook.office365.com/,https://graph.microsoft.com/,https://batch.core.windows.net/,https://analysis.windows.net/powerbi/api,https://storage.azure.com/,https://rest.media.azure.net,https://api.loganalytics.io,https://ossrdbms-aad.database.windows.net,https://www.yammer.com,https://digitaltwins.azure.net,0b07f429-9f4b-4714-9392-cc5e8e80c8b0,822c8694-ad95-4735-9c55-256f7db2f9b4,https://dev.azuresynapse.net,https://database.windows.net,https://quantum.microsoft.com,https://iothubs.azure.net,2ff814a6-3304-4ab8-85cb-cd0e6f879c1d,https://azuredatabricks.net/,ce34e7e5-485f-4d76-964f-b3d2b16d1e4f,https://azure-devices-provisioning.net,https://managedhsm.azure.net,499b84ac-1321-427f-aa17-267ca6975798,https://api.adu.microsoft.com/,https://purview.azure.net/,6dae42f8-4368-4678-94ff-3960e28e3630\"}}"

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

Look for the error message one level down in the json for cloud shell.

@neha-bhargava neha-bhargava added untriaged Do not delete. Needed for Automation needs attention Delete label after triage scenario:ManagedIdentity and removed untriaged Do not delete. Needed for Automation needs attention Delete label after triage labels Oct 31, 2023
@neha-bhargava neha-bhargava self-assigned this Oct 31, 2023
@pmaytak pmaytak added the P2 label Nov 1, 2023
@pmaytak pmaytak added this to the 4.60.0 milestone Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
2 participants