Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OAuth with Azure AD v2.0: What is the ext_expires_in parameter returned by Azure AD v2.0 in response to access token requests?

According to the Azure AD documentation, the Section “Request an access token” describes all the parameter keys that should be returned by Azure AD in response to access token requests via Azure v2.0 endpoint https://login.microsoftonline.com/{my_tenant}/oauth2/v2.0/token. Example of response body returned by Azure AD v2.0:

  "token_type": "Bearer",
  "scope": "User.Read",
  "expires_in": 3599,
  "ext_expires_in": 0,
  "access_token": "eyJ0eXAiO ...",
  "refresh_token": "OAQABAAAAAAA9kTklh ..."
  "id_token": "eyJ0eXAiOiJKV1QiLC ..."

The documentation does NOT mention ext_expires_in as one of the returned parameters. My questions are:

  • What is the definition of this key?
  • What kind of other expiration does ext_expires_in describe in addition to the current expires_in key currently does?
like image 475
jenny.lam Avatar asked Aug 14 '17 19:08

jenny.lam


People also ask

Which of the following OAuth 2.0 grants are supported by Azure AD?

Azure Active Directory (Azure AD) supports all OAuth 2.0 flows.

What is Ext_expires_in?

It is used to achieve uninterrupted services access even during an STS outage. The server may return the ext_expires_in value to indicate the extended lifetime of an access token.

What is Azure AD access token?

An access token contains claims that you can use in Azure Active Directory B2C (Azure AD B2C) to identify the granted permissions to your APIs. When calling a resource server, an access token must be present in the HTTP request. An access token is denoted as access_token in the responses from Azure AD B2C.


1 Answers

This claim is used to support resiliency. It is used to achieve uninterrupted services access even during an STS outage. The server may return the ext_expires_in value to indicate the extended lifetime of an access token. For more details you can see how ADAL uses this information: https://github.com/AzureAD/azure-activedirectory-library-for-android/issues/675

like image 179
Jean-Marc Prieur Avatar answered Sep 23 '22 20:09

Jean-Marc Prieur