Reputation: 762
I have been attempting to get email's from office 365 using PHP. Here i need to get email's without user login.So i'm trying to get access token without user login.
This is the end point where i'm getting access token.
https://login.microsoftonline.com/common/oauth2/v2.0/token
It's a POST request using following key param values
client_id xxxxxx
scope https://graph.microsoft.com/.default
client_secret xxxxxx
grant_type client_credentials
Then i'm getting response as
{
"token_type": "Bearer",
"expires_in": 3599,
"ext_expires_in": 0,
"access_token": "xxxxxxxxRiNDcvIiwiaWF0IjoxNTMzMDYwMjA2LCJuYmYiOxxxxx"
}
After that i don't know which api to use to get email's from mail box using access token.Thank you in advance.
Upvotes: 3
Views: 3988