Hi Vinay Sharma, Thanks for reaching out. There is nothing wrong either with the API or the query. Contacts property is only available for the users for whom the mailboxes are configured. Since you are using this query on all the users, there might be some users for which mailbox is not configured. Maybe you can try running the following query (There might be some users in the tenant for which mailbox is not setup like service accounts or conference rooms) https://graph.microsoft.com/v1.0/users/{user-id}/contacts In case it is not set up you will get the following error
If you will run the following query on beta endpoint. you will get to know that this feature will be removed in upcoming releases, and you will get the error message as in screenshot below. https://graph.microsoft.com/beta/users/{user-id}?$expand=contacts
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".