Getting Organization Group Members
You can get members of the group with the specified ID.
Request
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
The following parameters must be specified in the URL of the request:
Parameter | Type | Description |
---|---|---|
organizationId | string | Specifies the identification number of the Microsoft 365 organization. For more information on how to get this parameter, see Getting Organizations. |
groupId | string | Specifies the identification number of the group. For more information on how to get this parameter, see Getting Organization Groups. |
Request Body
None.
Response
The server returns the following response to the client.
Response Codes
A successfully completed operation returns a response code 200 OK.
Response Headers
The response to this request contains the following headers. The response may also include additional standard HTTPS headers.
Header | Description |
---|---|
Content-length | The length of the response body. |
Content-type | The media type and syntax of the response body message: application/json; charset=utf-8 |
Response Body
In the response body, the server returns a resource representation of the /Organizations/{organizationId}/Groups/{groupId}/Members collection resource. The response body contains the following properties:
Property | Type | Description |
---|---|---|
groupId | string | Specifies an identification number of the organization group to which the account belongs. |
name | string | Specifies the account name. |
login | string | Specifies the account login. |
type | string | Specifies the account type. The following types are available:
|
isCloud | boolean | Defines that the account belongs to the Microsoft Online group, not on-premises. |
_links | Dictionary of string [key] and Object [value] | Links to related resources (navigation property). |
Example
The example returns a resource representation of accounts that belong to the organization group with the ID 0eb7e684-b568-4487-8fe5-1c92cd13e91500000000-0000-0000-0000-000000000000.
Request: GET https://abc.tech.local:4443/v6/Organizations/e60dfb9c-ac58-4463-879f-9855ac35576b/Groups/0eb7e684-b568-4487-8fe5-1c92cd13e91500000000-0000-0000-0000-000000000000/Members
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: { "offset": 0, "limit": 30, "_links": { "self": { "href": "/v6/Organizations/e60dfb9c-ac58-4463-879f-9855ac35576b/Groups/0eb7e684-b568-4487-8fe5-1c92cd13e91500000000-0000-0000-0000-000000000000/Members?offset=0&limit=30&setid=c57a0a73-c666-4615-a518-9ffee773fcb6" } }, "results": [ { "groupId": "0eb7e684-b568-4487-8fe5-1c92cd13e91500000000-0000-0000-0000-000000000000", "name": "User1", "login": "user1@abc.onmicrosoft.com", "type": "User", "isCloud": true, "_links": { "organization": { "href": "/v6/organizations/e60dfb9c-ac58-4463-879f-9855ac35576b" } } }, { "groupId": "0eb7e684-b568-4487-8fe5-1c92cd13e91500000000-0000-0000-0000-000000000000", "name": "ABC Group", "login": "abc_group@abc.onmicrosoft.com", "type": "Group", "isCloud": true, "_links": { "organization": { "href": "/v6/organizations/e60dfb9c-ac58-4463-879f-9855ac35576b" } } } ], "setId": "c57a0a73-c666-4615-a518-9ffee773fcb6" } |