Users API is failed with error if birthday field was specified in $select query parameter

Egorius 41 Reputation points
2021-07-19T10:45:11.363+00:00

Hello!
I get the error when I use users delta query (https://learn.microsoft.com/en-us/graph/api/user-delta?view=graph-rest-1.0&tabs=http) with birthday field in $select query parameter.
Request example:

https://graph.microsoft.com/v1.0/users/delta?$select=id,userPrincipalName,givenName,surname,displayName,birthday,companyName,department,jobTitle,proxyAddresses,mail,otherMails,businessPhones,mobilePhone,faxNumber   

Response:

    {    
        "error": {    
            "code": "BadRequest",    
            "message": "Invalid request for delta query: for this entity set, $expand/$select is not supported for the following properties: birthday",    
            "innerError": {    
                "date": "2021-07-19T10:42:40",    
                "request-id": "d13cd022-3883-4ac7-817b-bf1a4d464902",    
                "client-request-id": "d13cd022-3883-4ac7-817b-bf1a4d464902"    
            }    
        }    
    }    

But according to docs of user resource this field is available (see attachment).115915-screenshot-2021-07-19-at-134331.png

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,002 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 41,941 Reputation points
    2021-07-20T06:20:49.177+00:00

    The doc is misleading. As far as I know, the birthday parameter only supports a single user using $select query parameter (/me or /users/{user id}), and does not support multiple users using $select query parameter (/users or /users/delta).

    Similar questions have also been raised on SO, so I suggest that you submit a feature request to Microsoft for this: https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/idb-p/Microsoft365DeveloperPlatform/label-name/Microsoft%20Graph


    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.