| title | List environments |
|---|---|
| description | Get all environment objects associated with a zone object. |
| author | Yarinle4 |
| ms.date | 11/26/2025 |
| ms.localizationpriority | medium |
| ms.subservice | security |
| doc_type | apiPageType |
Namespace: microsoft.graph.security
[!INCLUDE beta-disclaimer]
Get all environment objects associated with a zone object.
[!INCLUDE national-cloud-support]
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
[!INCLUDE rbac-security-zone-apis-read]
GET /security/zones/{zoneId}/environmentsThis method supports the $select, $filter, $count, $orderby, $top, and $skip OData query parameters to help customize the response. For general information, see OData query parameters. The default and maximum page sizes are 1,000 environment objects.
The following table lists the $filter and $orderby query support for each property.
| Property | $filter operators | $orderby |
|---|---|---|
| id | eq, contains |
✓ |
| kind | eq, in |
✓ |
The following table shows example query patterns.
| Query pattern | Example |
|---|---|
| Filter by environment kind | $filter=kind eq 'azureSubscription' |
| Filter by multiple kinds | $filter=kind in ('azureSubscription', 'awsAccount') |
| Filter by ID pattern | $filter=contains(id, '123') |
| Order by kind then ID | $orderby=kind asc,id asc |
| Pagination | $top=10&$skip=20&$count=true |
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Don't supply a request body for this method.
If successful, this method returns a 200 OK response code and a collection of microsoft.graph.security.environment objects in the response body.
The following example shows a request.
GET https://graph.microsoft.com/beta/security/zones/05cfec937c214892a14448562ef4bf4a/environments[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/security/zones/$metadata#environments",
"value": [
{
"@odata.type": "#microsoft.graph.security.environment",
"kind": "awsAccount",
"id": "181994123251"
},
{
"@odata.type": "#microsoft.graph.security.environment",
"kind": "awsAccount",
"id": "326438728454"
},
{
"@odata.type": "#microsoft.graph.security.environment",
"kind": "azureSubscription",
"id": "/subscriptions/02687862-a843-4846-81f0-efe9ef244daa"
},
{
"@odata.type": "#microsoft.graph.security.environment",
"kind": "gcpProject",
"id": "69483221284"
}
]
}