# Get Token Scope

Source: https://www.juniper.net/documentation/us/en/software/sd-cloud/api/http/jsec-apis/iam/get-token-scope

```http
GET /api/v2/tenant/tenant-id
```


# Authentication

This endpoint requires [OauthKeyAuth](https://www.juniper.net/documentation/us/en/software/sd-cloud/api/llms-pages/http/getting-started/how-to-get-started/authorization.md) **OR** [ApiKeyAuth](https://www.juniper.net/documentation/us/en/software/sd-cloud/api/llms-pages/http/getting-started/how-to-get-started/authorization.md)


# Response Type

**200**: A successful response.

[`Iam Get Token Scope Response`](https://www.juniper.net/documentation/us/en/software/sd-cloud/api/llms-pages/http/models/structures/iam-get-token-scope-response.md)


# Example Usage

```bash
curl -X GET \
  --url 'https://api.sdcloud.juniperclouds.net/api/v2/tenant/tenant-id'  \
  -H 'Accept: application/json' \
  -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36' \
  -H 'x-oauth2-token: x-oauth2-token' \
  -H 'x-api-key: x-api-key'
```


# Example Response *(as JSON)*

```json
{
  "tenant_id": "string"
}
```


# Errors

| HTTP Status Code | Error Description | Exception Class |
|  --- | --- | --- |
| 400 | Invalid request parameters. The request could not be understood or was missing required parameters. | [`runtimeError_ErrorException`](https://www.juniper.net/documentation/us/en/software/sd-cloud/api/llms-pages/http/models/exceptions/runtime-error-error.md) |
| 401 | Authentication required. The request requires valid user authentication credentials. | [`runtimeError_ErrorException`](https://www.juniper.net/documentation/us/en/software/sd-cloud/api/llms-pages/http/models/exceptions/runtime-error-error.md) |
| 403 | Forbidden. The client does not have access rights to the content. | [`runtimeError_ErrorException`](https://www.juniper.net/documentation/us/en/software/sd-cloud/api/llms-pages/http/models/exceptions/runtime-error-error.md) |
| 404 | Resource not found. The requested resource could not be found. | [`runtimeError_ErrorException`](https://www.juniper.net/documentation/us/en/software/sd-cloud/api/llms-pages/http/models/exceptions/runtime-error-error.md) |
| 409 | Conflict. The request could not be completed due to a conflict with the current state of the resource. This may occur when an object with the same name already exists in the system. | [`runtimeError_ErrorException`](https://www.juniper.net/documentation/us/en/software/sd-cloud/api/llms-pages/http/models/exceptions/runtime-error-error.md) |
| 429 | Resource exhausted. The request was rejected because a resource limit has been reached. This may occur due to rate limiting (too many requests in a given time period) or because the response payload size exceeds the maximum allowed threshold. Consider reducing the scope of the request, applying filters, or using pagination to retrieve smaller result sets. | [`runtimeError_ErrorException`](https://www.juniper.net/documentation/us/en/software/sd-cloud/api/llms-pages/http/models/exceptions/runtime-error-error.md) |
| 500 | Internal processing error. An unexpected error occurred on the server. | [`runtimeError_ErrorException`](https://www.juniper.net/documentation/us/en/software/sd-cloud/api/llms-pages/http/models/exceptions/runtime-error-error.md) |
| Default | An unexpected error response | [`runtimeError_ErrorException`](https://www.juniper.net/documentation/us/en/software/sd-cloud/api/llms-pages/http/models/exceptions/runtime-error-error.md) |



**IMPORTANT** This content is generated by PACE(Product Adoption & Content Education) - Internal Juniper documentation team.