capabilities.work

Azure API Management Rotate Subscription Keys

A 4-step recipe with Microsoft Azure API Management. We can help you get access.

Recipe · 4 steps

Azure API Management Rotate Subscription Keys

Regenerate both subscription keys and return the new secrets.

  1. Read the subscription to confirm it exists before rotating its keys.
  2. Regenerate the primary subscription key.
  3. Regenerate the secondary subscription key.
  4. Retrieve the rotated primary and secondary keys.
What you'll need to have ready
  • subscriptionId: The Azure subscription identifier.
  • resourceGroupName: The resource group containing the service.
  • serviceName: The API Management service name.
  • sid: The subscription identifier whose keys are rotated.
For your developer

Arazzo workflow microsoft-azure-api-management:rotate-subscription-keys, 4 operations: Subscription_Get → Subscription_RegeneratePrimaryKey → Subscription_RegenerateSecondaryKey → Subscription_ListSecrets. Specs on APIs.io.