GET /users throws InternalServerError with 200 status code and POST /users UnknownError with 405 status code

jamesderaja zoho 0 Reputation points
2024-04-25T13:13:57.81+00:00

GET v1.0/users?$select=id,delet... throws

{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users(id,displayName,businessPhones,preferredLanguage,mail,mobilePhone,officeLocation,surname,givenName,jobTitle,userPrincipalName,createdDateTime,creationType,licenseAssignmentStates,streetAddress,userType,state,postalCode,employeeType,employeeId,country,companyName,city,accountEnabled)","value":[{"error":{"code":"InternalServerError","message":"Invalid response. Expected list response must have value property.","innerError":{"date":"2024-04-25T11:36:28","request-id":"d16deee8-e707-4317-9c42-c01d26acc19c","client-request-id":"d16deee8-e707-4317-9c42-c01d26acc19c"}}}

with status code: 200

And,

POST v1.0/users?$select=id,delete... throws error,

{"error":{"code":"UnknownError","message":"","innerError":{"date":"2024-04-24T06:28:55","request-id":"32796f0f-298c-4e8a-ada1-6e85cd1ca336","client-request-id":"32796f0f-298c-4e8a-ada1-6e85cd1ca336"}}}

with status code: 405

Can anyone help me understand the root cause of this issue?

Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,376 Reputation points
    2024-04-26T02:59:06.2566667+00:00

    Hi @jamesderaja zoho

    The $select query parameter can only be used in GET requests to return specific user object parameters. POST requests are usually used to create user objects and do not support the $select query parameter.

    Hope this helps.

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


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.