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

ManagedIdentityCredential cannot parse expires_on from App Service for Windows #9393

Closed
jianghaolu opened this issue Jan 10, 2020 · 0 comments · Fixed by #9480
Closed

ManagedIdentityCredential cannot parse expires_on from App Service for Windows #9393

jianghaolu opened this issue Jan 10, 2020 · 0 comments · Fixed by #9480
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. Managed Identity

Comments

@jianghaolu
Copy link

In https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/identity/azure-identity/azure/identity/_authn_client.py#L138

The format to parse the expires_on field is m/%d/%Y %H:%M:%S, however, 2017-09-01 version of managed identity service on App Services for Windows returns a payload with date times formatted as "expires_on":"1/10/2020 8:01:28 AM +00:00", which results in error:

Traceback (most recent call last):
  File "app.py", line 4, in <module>
    parsed = time.strptime(expires_on[: -len(" +00:00")], "%m/%d/%Y %H:%M:%S")
  File "/usr/lib/python3.6/_strptime.py", line 559, in _strptime_time
    tt = _strptime(data_string, format)[0]
  File "/usr/lib/python3.6/_strptime.py", line 365, in _strptime
    data_string[found.end():])
ValueError: unconverted data remains:  AM
@jianghaolu jianghaolu added Azure.Identity Client This issue points to a problem in the data-plane of the library. Managed Identity and removed triage labels Jan 10, 2020
@chlowell chlowell self-assigned this Jan 15, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. Managed Identity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants