Partilhar via


IdentityApplicationOptions.Audiences Property

Definition

In a web API, accepted audiences for the tokens received by the web API.

See also Audience.

The audience is the intended recipient of the token. You can usually assume that the ApplicationID of your web API is a valid audience. It can, in general be any of the App ID URIs (or resource identitfier) you defined for your application during its registration in the Azure portal.
public System.Collections.Generic.IEnumerable<string>? Audiences { get; set; }
member this.Audiences : seq<string> with get, set
Public Property Audiences As IEnumerable(Of String)

Property Value

Examples

Here is an example of client credentials in the AzureAd section of the appsetting.json. The app will try to use workload identity federation from Managed identity (when setup and deployed in Azure), and otherwise, will use a certificate from Key Vault, and otherwise, will use a client secret.

 "Audiences": [
   "api://a88bb933-319c-41b5-9f04-eff36d985612",
   "a88bb933-319c-41b5-9f04-eff36d985612",
   "https://mydomain.com/myapp"
 ]

See also https://aka.ms/ms-id-web-certificates.

Remarks

If both Audiences and Audience, are expressed, the effective audiences is the union of these properties.

Applies to