Skip to content

[Feature Request] Expose refreshOn in IAuthenticationResult #822

@g2vinay

Description

@g2vinay

MSAL client type

Public, Confidential, Managed identity

Problem Statement

The refreshOn property of the token isn't returned as part of IAuthenticationResult.
It prevents users from accessing and honoring this property.

This feature is required for :

  1. Cross-language consistency with .NET and other Azure languages which support this capability already.
  2. Enterprise Azure customers need this capability exposed so that token cache refreshes can happen more aggressively and reduce the chance of performance issues with near-expired or expired tokens

Today, Azure SDK has its Token Cache implementation which defaults to a refresh offset of 5 minutes.
This cache caters to all implementations of TokenCredential which may or may not be using Msal.
So, today the refresh offset of 5 minutes overrides the Msal's refresh_on , as the refresh_on is not available at Azure SDK cache layer.
We need the refresh_on information to correctly invoke the TokenCredential at its desired refresh_on time.

Further, the default refresh offset of 5 minutes in Azure SDK token cache is creating reliability issues for our enterprise customers and the ask is for Azure SDK to use the refresh on info in their cache implementation to invoke the token credential at the given refresh on time.

Proposed solution

Expose the refreshOn property of the token similar to the expiry time.

Alternatives

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    AzureSDKIssues and requests affecting the Azure SDKEnhancementA request or suggestion to improve some aspect of the library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions