Edit

Start and stop environments

Note

Community interest groups have now moved from Yammer to Microsoft Viva Engage. To join a Viva Engage community and take part in the latest discussions, fill out the Request access to Finance and Operations Viva Engage Community form and choose the community you want to join.

Important

Starting February 2026, new customers can't create projects in Microsoft Dynamics Lifecycle Services for Microsoft Dynamics 365 Finance, Microsoft Dynamics 365 Human Resources, Microsoft Dynamics 365 Supply Chain Management, and Microsoft Dynamics 365 Project Operations. New customers should use the Power Platform admin center instead. For more information, see Lifecycle Services project creation freeze.

You can start and stop environments through Microsoft Dynamics Lifecycle Services (LCS) by using the LCS Environment API. By using these APIs, you ensure that the LCS environment status stays in sync with the actual environment.

Note

The same validation rules that apply to the details page in LCS also apply to the API.

Note

  • Only Customer-managed environments are supported. Self-service environments don't have the same concept of stop and start, so they're not supported by this API. Microsoft-managed environments aren't supported.
  • These APIs trigger the operation. A successful response only indicates that the trigger was successful.
  • For stop, the API returns an error if the environment is already undergoing another operation or if the environment is already stopped.
  • For start, the API returns an error if the environment is already undergoing another operation but returns success if the environment is already started.

Permissions

You need one of the following permissions to call this API. For more information about permissions and how to select them, see Database Movement API Authentication.

Permission type Permissions (from least privileged to most privileged)
Delegated (work or school account) user_impersonation

HTTP request

Use the following POST method to send an HTTP request that stops or starts an environment.

Stop an environment

POST /environment/v1/stop/project/{projectId}/environment/{environmentId}

Start an environment

POST /environment/v1/start/project/{projectId}/environment/{environmentId}

Request headers

Use the following header value in the HTTP request header.

Header Value
Authorization Bearer {token} (required)
'x-ms-version' '2017-09-15' (required)
Content-Type application/json

Request body

Don't supply a request body for this method.

Response

The response is always a 200 OK response, unless you're incorrectly authenticated. Use the IsSuccess property to evaluate the success or failure of the action.

Example

Request to stop an environment

POST /environment/v1/stop/project/{projectId}/environment/{environmentId}

Successful response

{
    "IsSuccess": true,
    "OperationActivityId": "55eb4327-9346-4c7b-82bd-fe8ef15112c6",
    "ErrorMessage": null,
    "VersionEOL": "9999-12-31T23:59:59.9999999"
}

Rate limits

To better load balance the request, the Start and Stop APIs have rate limits:

For the Start API, the following limits apply:

  • 1 call for each environment every 5 minutes
  • 30 calls for each user every 30 minutes

For the Stop API, the following limits apply:

  • 1 call for each environment every 5 minutes
  • 30 calls for each user every 30 minutes

Note

The API rejects requests that exceed these limits and returns a HTTP 429 Too Many Requests response. The retry-after header shows the number of seconds before you can retry the request.