skip to Main Content

I use below code but when I login via Microsoft account I don’t receive refresh_token. Someone can explain why?

$login = 'https://login.microsoftonline.com/xxxxxxxxxxxxxxxxxxxxxxxxx/oauth2/v2.0/authorize?'.http_build_query([
    'client_id'              => $id,    
    'scope'                  => 'https://outlook.office.com/IMAP.AccessAsUser.All',
    'redirect_uri'           => $redirect,       
    'response_type'          => 'code',
]);

2

Answers


  1. Make sure you request offline_access permission.

    Login or Signup to reply.
  2. I found solution for my all questions. I had to add offline_access to the scope.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search