Facing InternalServerError while using user api of graph message in response is : Error processing response from backend service.

Vinay Sharma 50 Reputation points
2024-02-02T10:48:39.39+00:00

Hi all, I am using a user API : https://graph.microsoft.com/v1.0/users?$select=country,companyName,city&$expand=contacts($select=jobTitle)
OR API : https://graph.microsoft.com/v1.0/users?$select=country,companyName,city&$expand=contacts getting

 "error": {
        "code": "InternalServerError",
        "message": "Error processing response from backend service."
}

I am attaching a screenshot of Postman on which I am facing the issue.
User's image

User's image

Queries:

  1. Please check if there is an error in the URL or query parameters.
  2. Why I am facing this issue and how can I fix it?
  3. Also when I am using API: https://graph.microsoft.com/v1.0/users?$select=country,companyName,city&$expand=extensions it is working fine and getting 200 ok status.

Could anyone help me with this?

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,364 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,447 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,300 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sourabh Gupta 800 Reputation points Microsoft Vendor
    2024-02-03T12:05:21.6+00:00

    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

    User's image

    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

    User's image

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

0 additional answers

Sort by: Most helpful