Azure Active Directory B2C authorization code flow access token response expires_in field as a Int

Ishara Pannila 21 Reputation points
2022-06-05T23:31:28.113+00:00

https://learn.microsoft.com/en-us/azure/active-directory-b2c/authorization-code-flow#2-get-an-access-token

In the above docs the example response for expires_in field shows as below

 {  
   "expires_in":"3600",  
 }  

In the https://datatracker.ietf.org/doc/html/rfc6749#section-5.1 it show as below

 {  
   "expires_in":3600,  
 }  

So my question is,

  1. Is this the default behavior of the expires_in field for B2C authorization code flow ( string instead for int)?
  2. If yes how can we change it to a int?
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,922 questions
0 comments No comments
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 56,666 Reputation points
    2022-06-06T08:18:36.73+00:00

    Hi @Ishara Pannila • Thank you for reaching out.

    1. Is this the default behavior of the expires_in field for B2C authorization code flow ( string instead for int)?
    Yes, this is the default behavior in case of Azure AD B2C. Regardless of which authentication flow or user flow is used, the "expires_in" parameter is returned as "3600" (string). Whereas in standard Azure AD, this value is returned as an Int.

    2. If yes how can we change it to an int?
    As of now, the type for "expires_in" property is not exposed for customization. Currently, only the value can be increased or decreased but there is no option available to change the type from string to Int. All the customization settings available for JWT Issuer technical profile as documented here: https://learn.microsoft.com/en-us/azure/active-directory-b2c/jwt-issuer-technical-profile#metadata

    I would suggest you post an idea on the User Voice portal to return it as Int rather than a string. This portal is monitored by the product teams for product improvements and feature enhancements.

    -----------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.