0
votes

Starting from here: https://dev.outlook.com/restapi/tutorial/php

Scopes:

private static $scopes = array("openid"
  ,"profile"
  ,"offline_access"
  ,"https://outlook.office.com/calendars.read"
  ,"https://outlook.office.com/contacts.read"
  );

When I authenticate I get in id_token only some basic info about the profile.

With:

https://outlook.office.com/api/v2.0/me/contacts

I get some very nice details about contacts, like phone numbers that I'm specially interested in my case.

Is possible to get the same level of details for the current user profile as you get for one of its contacts when is accessed through the api?

1

1 Answers

1
votes

How about using the Microsoft Graph API:

GET https://graph.microsoft.com/v1.0/me

The response should like as following:

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 491

{
  "businessPhones": [
       "businessPhones-value"
   ],
   "displayName": "displayName-value",
   "givenName": "givenName-value",
   "jobTitle": "jobTitle-value",
   "mail": "mail-value",
   "mobilePhone": "mobilePhone-value",
   "officeLocation": "officeLocation-value",
   "preferredLanguage": "preferredLanguage-value",
   "surname": "surname-value",
   "userPrincipalName": "userPrincipalName-value",
   "id": "id-value"
} 

Graph API - Get user