Open gladjohn opened 1 month ago
Invalid Issue Template: Please update the original issue and make sure to fill out the entire issue template so we can better assist you.
Right now, expiresOn is received from the MI as a Unix Timestamp number. I can add functionality to check if expiresOn is a string, and if it is, that means it's in ISO 8601 format and it'll be converted to a Unix timestamp.
@gladjohn Before I add this functionality, I need your assurance that if expiresOn is not received as a unix timestamp number, then it'll be received as a string ISO 8601. It'll be either/or, and will never be a string Unix Timestamp. Can you confirm this?
Right now, expiresOn is received from the MI as a Unix Timestamp number. I can add functionality to check if expiresOn is a string, and if it is, that means it's in ISO 8601 format and it'll be converted to a Unix timestamp.
@gladjohn Before I add this functionality, I need your assurance that if expiresOn is not received as a unix timestamp number, then it'll be received as a string ISO 8601. It'll be either/or, and will never be a string Unix Timestamp. Can you confirm this?
take a look the fix here : https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/ac1cb0522a011e0a6e0802a2535bf03cfd8d9fab/src/client/Microsoft.Identity.Client/Utils/DateTimeHelpers.cs#L77
Core Library
MSAL.js (@azure/msal-node)
Core Library Version
latest
Public or Confidential Client?
Confidential
Description
The method responsible for calculating token expiration (expires_on) in MSAL (Managed Identity) is not handling various date-time formats correctly. This leads to errors or incorrect results when processing expiration times in different formats provided by the Managed Identity service.
more info : https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/4963
Error Message
No response
MSAL Logs
No response
Network Trace (Preferrably Fiddler)
MSAL Configuration
Relevant Code Snippets
Reproduction Steps
Added parsing logic for Unix timestamps, ISO 8601
Expected Behavior
Added parsing logic for Unix timestamps, ISO 8601
Identity Provider
Entra ID (formerly Azure AD) / MSA
Browsers Affected (Select all that apply)
None (Server)
Regression
No response