blake_griffin
blake_griffin

Reputation: 119

Azure GraphAPI getMemberGroups Bad Request error

I am attempting to make the Azure Graph API call getMemberGroups, however I am getting a "400 Bad Request" error in response.

According to the documentation [https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/functions-and-actions#getMemberGroups], the following request should be : enter image description here

I am using POSTMAN to make the request however I keep getting a "Request_BadRequest" error code.

My POST request is:

enter image description here Where the red bar is the tenant ID and the blue bar is the object ID of the user.

My headers are:

enter image description here

My body is:

enter image description here

I keep getting the error message:

{
    "odata.error": {
        "code": "Request_BadRequest",
        "message": {
            "lang": "en",
            "value": "Invalid JSON. The value '------' is not a valid number."
        }
    }
}

I am not too sure why that is happening, does anyone have any clues?

Upvotes: 2

Views: 988

Answers (2)

Balaraju Polaki
Balaraju Polaki

Reputation: 133

How to know the authorization token of the Ad User

enter image description here

Upvotes: 0

Fei Xue
Fei Xue

Reputation: 14649

Since we are posting the json data, you shouldn't use the form-data. For the application/json type data, we should use the raw option to send the data.

Upvotes: 4

Related Questions