Using the Microsoft Graph API, I want to create a list of all Office 365 users's birtdays, but I cannot get the list of users with the related properties at the moment.
To set up this list I need the following properties exposed via the Graph API:
- id
- displayName
- userPrincipalName
- birthday
Using the Graph Explorer, https://graph.microsoft.io/en-us/graph-explorer, I've tried to request my own properties (graph.microsoft.com/v1.0/Me/?$select=id,displayName,userPrincipalName,birthday) which works:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(id,displayName,userPrincipalName,birthday)/$entity",
"id": "aaaaaaaa-bbbbb-ccccc-a3c6-63817c4bbbca",
"displayName": "Harold van de Kamp",
"userPrincipalName": "[email protected]",
"birthday": "2000-08-15T00:00:00Z"
}
When I query all users (graph.microsoft.com/v1.0/Users), that also works, but doens't contain all the required properties
But when I query all users with the required properties (graph.microsoft.com/v1.0/Users/?$select=id,displayName,userPrincipalName,birthday), I get the following error:
{
"error": {
"code": "InternalServerError",
"message": "This operation is not yet supported.",
"innerError": {
"request-id": "06a7b9c9-2fcd-4f26-a86c-fe9704a35a1e",
"date": "2016-06-11T11:15:45"
}
}
}
Querying the beta API (graph.microsoft.com/beta/Users/?$select=id,displayName,userPrincipalName,birthday) results in the same error.
Question: Any idea why I get this error and how can we get this working?
Bonus question: Is it possible to directly query only a list of upcoming 15 birthdays?