Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 2.25 KB

authentication-basic-policy.md

File metadata and controls

60 lines (38 loc) · 2.25 KB
titledescriptionservicesauthorms.servicems.topicms.datems.author
Azure API Management policy reference - authentication-basic | Microsoft Docs
Reference for the authentication-basic policy available for use in Azure API Management. Provides policy usage, settings, and examples.
api-management
dlepow
azure-api-management
reference
07/23/2024
danlep

Authenticate with Basic

[!INCLUDE api-management-availability-all-tiers]

Use the authentication-basic policy to authenticate with a backend service using Basic authentication. This policy effectively sets the HTTP Authorization header to the value corresponding to the credentials provided in the policy.

[!INCLUDE api-management-credentials-caution]

[!INCLUDE api-management-policy-generic-alert]

Policy statement

<authentication-basicusername="username"password="password" />

Attributes

AttributeDescriptionRequiredDefault
usernameSpecifies the username of the Basic credential. Policy expressions are allowed.YesN/A
passwordSpecifies the password of the Basic credential. Policy expressions are allowed.YesN/A

Usage

Usage notes

  • This policy can only be used once in a policy section.
  • We recommend using named values to provide credentials, with secrets protected in a key vault.

Example

<authentication-basicusername="testuser"password="testpassword" />

Related policies

[!INCLUDE api-management-policy-ref-next-steps]

close