<PackageReference Include="Azure.Core" Version="1.47.2" />

AzureNamedKeyCredential

Credential allowing a named key to be used for authenticating to an Azure Service. It provides the ability to update the key without creating a new client.
public string Name { get; }

Name of the key used to authenticate to an Azure service.

public AzureNamedKeyCredential(string name, string key)

Initializes a new instance of the AzureNamedKeyCredential class.

public void Deconstruct(out string name, out string key)

Allows deconstruction of the credential into the associated name and key as an atomic operation.

public void Update(string name, string key)

Updates the named key. This is intended to be used when you've regenerated your service key and want to update long-lived clients.