0
votes

I am trying to generate the OAUTH access token using the below end point with the below request. But unfortunately, I am not getting the refresh token in the response and all other details are displayed successfully in the response.

End Point: oauth2/token

Request:

resource : resource name, client_id : client_id, grant_type : client_credentials, client_secret : client_secret

Response:

"token_type": "Bearer",
"expires_in": "3600",
"ext_expires_in": "0",
"expires_on": "1526380235",
"not_before": "1526376335",
"resource":  <<resource name>>
"access_token": <<generated token>>

Have I missed anything in this request?

1

1 Answers

2
votes

If you authenticate with client credentials, you don't get a refresh token. You need to use the credentials each time.

What would the point be anyway? If you got a refresh token, you would need to give Azure AD the credentials with it anyway to get the new token.

The point is you don't need a refresh token in this case.