---
title: "Fetch the User API Key from the internal database, if it was generated and stored during the creation of the Elasticsearch Organization."
method: POST
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Elastic/getOrganizationApiKey"
---

# Fetch the User API Key from the internal database, if it was generated and stored during the creation of the Elasticsearch Organization.

`POST /subscriptions/{subscriptionId}/providers/Microsoft.Elastic/getOrganizationApiKey`

Fetch the User API Key from the internal database, if it was generated and stored during the creation of the Elasticsearch Organization.

## Parameters

- `../../../../../../common-types/resource-management/v5/types.json#/components/parameters/ApiVersionParameter` — unresolved $ref
- `../../../../../../common-types/resource-management/v5/types.json#/components/parameters/SubscriptionIdParameter` — unresolved $ref

## Request body

- UserEmailId — Email Id of the User Organization, of which the API Key must be returned
  - `emailId` string — The User email Id

## Response `200`

The request has succeeded.

- UserApiKeyResponse — The User Api Key created for the Organization associated with the User Email Id that was passed in the request
  - `properties` UserApiKeyResponseProperties
    - `apiKey` string, password — The User Api Key Generated based on GenerateApiKey flag. This is applicable for non-Portal clients only.

## Other responses

- `default` — An unexpected error response.

## Changes

- **2026-07-13** (2020-07-01) `bef7fe1e4bee` — 1 info
  - api tag `ApiKey` removed
- **2026-07-13** (2020-07-01) `ad4faf7e4e75` — 1 info
  - endpoint added
- **2026-07-13** (2020-07-01) `f26ebd7a2a28` — 2 warning
  - deleted the `path` request parameter `subscriptionId`
  - deleted the `query` request parameter `api-version`

[Change history](https://skmtc.dev/azure/apis/elastic-microsoft-elastic-elastic/changes/subscriptions/:subscriptionId/providers/Microsoft.Elastic/getOrganizationApiKey/post.md)

---

[API](https://skmtc.dev/azure/apis/elastic-microsoft-elastic-elastic.md) · [All operations](https://skmtc.dev/azure/apis/elastic-microsoft-elastic-elastic/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/elastic-microsoft-elastic-elastic/revisions/bef7fe1e4bee/schema)
