Azure / Azure/api-management-policy-snippets

Question: OAuth2 access token from AAD and forward it to the backend

Open
#84 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
399
Forks
170
PR merge metrics
No merged PRs in 30d

Description

I've been looking at
https://github.com/Azure/api-management-policy-snippets/blob/47a03189f4fd75563ae2c234a13510dd6e23e6db/examples/Get%20OAuth2%20access%20token%20from%20AAD%20and%20forward%20it%20to%20the%20backend.policy.xml#L23

and had a question to @mike-urnun-msft about caching and checking token expiration time.

Shouldn't OAUTH policy include those to avoid calls to AAD when still valid token could be cached?

Contributor guide

No contributing guide indexed for this repository

Research direction

Read examples/Get OAuth2 access token from AAD and forward it to the backend.policy.xml at line 23. Investigate whether the policy should cache tokens and check expiration before calling AAD. The issue does not specify tests or acceptance criteria, so completion would need maintainer agreement on the expected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api, authentication
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.