microsoft-Graph getting only Scope user.read

Asked

Viewed 24 times

0

Hello!

If anyone can help. I’m trying to get emails from some of our organization’s 365 accounts to integrate with a CRM application. The program is in PHP and I’m trying to access in microsoft Graph as follows: http post in

https://login.microsoftonline.com/{mytenantId}/Oauth2/token

passing as parameters:

client_id = myAppId,
client_secret = myAppPassword,
resource = 'https://graph.microsoft.com/',
username = [email protected],
password = passwordDoVendedor,
scope = 'user.read,mail.read,mail.send',
grant_type = 'password',
prompt = 'admin_consent'

Running, it returns the access_token and refresh_toke with status 200, but in Scope only comes 'User.read'

Would someone tell me what’s missing so I can access the other scopes?

I appreciate the help

  • according to the documentation the scope is delimited by spaces, you are placing comma, following documentation:https://docs.microsoft.com/pt-br/outlook/rest/get-started

  • It filled me with hope, but that’s not it. I’ve tried it in many ways: 'Mail.Read' alone, 'Mail.Read Mail.Send', with comma, with space. Thanks for the tip. Pity it’s not that ;)

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.