# Method: organizations.locations.cmEnrollment.calculate

- [HTTP request](https://docs.cloud.google.com/security-command-center/docs/reference/cloudsecuritycompliance/rest/v1/organizations.locations.cmEnrollment/calculate#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/security-command-center/docs/reference/cloudsecuritycompliance/rest/v1/organizations.locations.cmEnrollment/calculate#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/security-command-center/docs/reference/cloudsecuritycompliance/rest/v1/organizations.locations.cmEnrollment/calculate#body.request_body)
- [Response body](https://docs.cloud.google.com/security-command-center/docs/reference/cloudsecuritycompliance/rest/v1/organizations.locations.cmEnrollment/calculate#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/security-command-center/docs/reference/cloudsecuritycompliance/rest/v1/organizations.locations.cmEnrollment/calculate#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/security-command-center/docs/reference/cloudsecuritycompliance/rest/v1/organizations.locations.cmEnrollment/calculate#body.aspect_1)

Calculates the effective Compliance Manager enrollment for a resource. An effective enrollment is either a direct enrollment of a resource (if it exists), or an enrollment of the closest parent of a resource that's enrolled in Compliance Manager.

### HTTP request

`GET https://cloudsecuritycompliance.googleapis.com/v1/{name=organizations/*/locations/*/cmEnrollment}:calculate`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The name of the Compliance Manager enrollment to calculate. Supported formats are the following: - `organizations/{organization_id}/locations/{location}/cmEnrollment` - `folders/{folder_id}/locations/{location}/cmEnrollment` - `projects/{projectId}/locations/{location}/cmEnrollment` |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/security-command-center/docs/reference/cloudsecuritycompliance/rest/v1/CalculateEffectiveCmEnrollmentResponse`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `cloudsecuritycompliance.cmEnrollments.get`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).