---
title: "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey"
method: POST
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey"
tags: ["SignalR"]
---

# POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey

`POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey`

## Request

- Base URL: `https://management.azure.com`
- URL: `https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey`
- Auth: OAuth 2
  - Implicit: `https://login.microsoftonline.com/common/oauth2/authorize`
  - Scopes: `user_impersonation`

Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time.

## Path parameters

- `subscriptionId` string, uuid, required
- `resourceGroupName` string, required
- `resourceName` string, required

## Query parameters

- `api-version` string, required

## Request body

- RegenerateKeyParameters: Parameters describes the request to regenerate access keys
  - `keyType` 'Primary' | 'Secondary' | 'Salt': The type of access key.

## Response `200`

Success

- SignalRKeys: A class represents the access keys of the resource.
  - `primaryKey` string: The primary access key.
  - `secondaryKey` string: The secondary access key.
  - `primaryConnectionString` string: Connection string constructed via the primaryKey
  - `secondaryConnectionString` string: Connection string constructed via the secondaryKey

## Other responses

- `202`: Accepted and an async operation is executing in background to make the new key to take effect. The response contains new access keys and a Location header to query the async operation result.
- `default`: Error response describing why the operation failed.

## Changes

- **2026-07-13** (2018-03-01-preview) `94871f8ab7ff`: 3 breaking, 1 warning, 2 info
  - added the new path request parameter `resourceGroupName`
  - added the new path request parameter `subscriptionId`
  - added the new required `query` request parameter `api-version`
  - the optional response header `Retry-After` removed for the status `202`
  - …2 more
- **2026-07-13** (2018-03-01-preview) `ad21d6da7391`: 2 info
  - api tag `SignalRResources` added
  - api tag `SignalR` removed
- **2026-07-13** (2018-03-01-preview) `aa4ef06ff10f`: 3 warning, 1 info
  - deleted the `path` request parameter `resourceGroupName`
  - deleted the `path` request parameter `subscriptionId`
  - deleted the `query` request parameter `api-version`
  - added the success response with the status `200`
- **2026-07-13** (2018-03-01-preview) `dbdc7f6b8387`: 1 breaking, 1 info
  - removed the success response with the status `201`
  - added the success response with the status `202`
- **2026-07-13** (2018-03-01-preview) `763f3618a6a6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/azure/apis/signalr-microsoft-signalrservice-signalrservice/changes/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.SignalRService/signalR/:resourceName/regenerateKey/post.md)

---

[API](https://skmtc.dev/azure/apis/signalr-microsoft-signalrservice-signalrservice.md) - [All operations](https://skmtc.dev/azure/apis/signalr-microsoft-signalrservice-signalrservice/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/signalr-microsoft-signalrservice-signalrservice/revisions/94871f8ab7ff?raw)
