Share via

Didn't recieve refresh token while authentication

Anonymous
2019-09-09T07:50:04+00:00

I'm using office 365 graph api, while authentication(using postman) i am not getting refresh token. The access_token expires in 1 hour after that i have to again generate authentication code and then ask for new access_token. I have no option to refresh the previous token.

Process I follow to get access_token:

  1. Send a get request to- https://login.microsoftonline.com/common/oauth2/v2.0/authorize with params: client_id : xxxxxxxxxxxxxxxxxxxxx, client_secret : xxxxxxxxxxxxxxxxxxxxx, response_type : code, redirect_uri : http://localhost:8069, scope : Calendars.Read, response_mode : query, state : success, here i'll get code in response in the provided redirect_uri
  2. Then i'll send a post request to- https://login.microsoftonline.com/common/oauth2/v2.0/token with form-data: grant_type : authorization_code, code : xxxxxxxxxxxxxxxxxxxxxxx, client_secret : xxxxxxxxxxxxxxxxxxxxxxx, client_id : xxxxxxxxxxxxxxxxxxxxxxx, scope : Calendars.Read, redirect_uri : http://localhost:8069,

In response, i am supposed to get-

{

"token_type": "Bearer", 

"scope": "Calendars.Read",

"expires_in": 3600,

"access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",

"refresh_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

}

But i am getting -

{

"token_type": "Bearer",

"scope": "Calendars.Read",

"expires_in": 3600,

"ext_expires_in": 3600,

"access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",

}

Please help

Microsoft 365 and Office | Subscription, account, billing | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2019-09-09T09:18:16+00:00

    Hello AkahayKumarIT,

    Welcome to the Microsoft Community and thanks for posting in the forum. Please forgive us for have limited knowledge about Office 365 Graph API. In order to gain more professional assistance and help you better on it, I recommend you go to Office 365 for Developer community. The members and experts there will help you better with this concern. Hope the information above helps!

    Regards,

    Rick

    Was this answer helpful?

    0 comments No comments