Skip to main content
added 1 character in body
Source Link
Baked Inhalf
  • 3.8k
  • 1
  • 40
  • 52

Is it possible to have a single API in APIM that either accepts AAD token or subscription, based on what product it belongs to?

Default, this does not work, since unchecking "require subscription" on API-level will override setting product to require subscription.

So, I see two solutions.. create two APIs in APIM and place them in separate products (same backend), or write a custom policy. Is there a way to check context.Subscription.Key and match with the product subscriptions?

Is it possible to have a single API in APIM that either accepts AAD token or subscription, based on what product it belongs to?

Default this does not work, since unchecking "require subscription" on API-level will override setting product to require subscription.

So, I see two solutions.. create two APIs in APIM and place them in separate products (same backend), or write a custom policy. Is there a way to check context.Subscription.Key and match with the product subscriptions?

Is it possible to have a single API in APIM that either accepts AAD token or subscription, based on what product it belongs to?

Default, this does not work, since unchecking "require subscription" on API-level will override setting product to require subscription.

So, I see two solutions.. create two APIs in APIM and place them in separate products (same backend), or write a custom policy. Is there a way to check context.Subscription.Key and match with the product subscriptions?

Source Link
Baked Inhalf
  • 3.8k
  • 1
  • 40
  • 52

Azure API Management, single API accept AAD or subscription key

Is it possible to have a single API in APIM that either accepts AAD token or subscription, based on what product it belongs to?

Default this does not work, since unchecking "require subscription" on API-level will override setting product to require subscription.

So, I see two solutions.. create two APIs in APIM and place them in separate products (same backend), or write a custom policy. Is there a way to check context.Subscription.Key and match with the product subscriptions?