-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix attribute mapping for ManagedIdentityToken #40268
base: main
Are you sure you want to change the base?
Conversation
Thank you for your contribution @jimdigriz! We will review the pull request and get back to you soon. |
As per the documentation[1] the response to listTokens is formatted as: ---- {"value":[{"authorizationAudience":"https://management.azure.com/","resourceId":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}","access_token":"...","expires_in":"86399","expires_on":"1743242070","not_before":"1743155371","token_type":"Bearer"}]} ---- The current mapping expects all the attributes to be in camel case, when the token parts are actually in snake; in particular 'access_token' and 'token_type'. This commit fixes the mapping so that <ManagedIdentityToken>.access_token no longer always returns None. [1] https://learn.microsoft.com/en-us/azure/azure-resource-manager/managed-applications/publish-managed-identity#accessing-the-managed-identity-token
04ace1e
to
cf841d8
Compare
Thanks for this patch @jimdigriz! |
Hi @jimdigriz this SDK model is generated from https://github.com/Azure/azure-rest-api-specs/blob/166c3a2ace3d2511cbdeeada95826cd67a45895e/specification/solutions/resource-manager/Microsoft.Solutions/preview/2023-12-01-preview/managedapplications.json#L2849-L2881. Please file an issue in https://github.com/Azure/azure-rest-api-specs/issues. After service team fix the swagger, SDK team will release a new SDK verison to fix it. |
They have 1800+ issues, guess I should not be holding my breath? :) |
As per the documentation the response to listTokens is formatted as:
The current mapping expects all the attributes to be in camel case, when the token parts are actually in snake; in particular 'access_token' and 'token_type'.
This commit fixes the mapping so that
<ManagedIdentityToken>.access_token
no longer always returns None.