| title | Delete environment |
|---|---|
| description | Delete an environment from a zone by providing the environment ID. The environment ID should be URL-encoded. |
| author | Yarinle4 |
| ms.date | 11/26/2025 |
| ms.localizationpriority | medium |
| ms.subservice | security |
| doc_type | apiPageType |
Namespace: microsoft.graph.security
[!INCLUDE beta-disclaimer]
Delete an environment object from a zone object by providing the environment ID. The environment ID should be URL-encoded.
[!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-write]
DELETE /security/zones/{zoneId}/environments/{environmentId}| 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 204 No Content response code.
The following example shows a request to detach an Azure subscription environment from a zone.
The environment ID for Azure subscriptions uses the /subscriptions/{subscription-id} format and must be URL-encoded when used in the request URL.
| Format | Value |
|---|---|
| Original | /subscriptions/d34fd44c-ebfa-4a9c-bceb-9eeafe72ac15 |
| URL-encoded | %2Fsubscriptions%2Fd34fd44c-ebfa-4a9c-bceb-9eeafe72ac15 |
DELETE https://graph.microsoft.com/beta/security/zones/f6e190cba2f64bcba703694aedb81712/environments/%2Fsubscriptions%2Fd34fd44c-ebfa-4a9c-bceb-9eeafe72ac15The following example shows the response.
HTTP/1.1 204 No Content