Skip to content

Authenticating from CI/CD when using OIDC + Azure AD #6039

Answered by seb2020
jurajseffer asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

You can read https://www.apicur.io/blog/2024/09/23/registry-azure-entraid-tutorial for creating a second azure app for machine-to-machine. It has helped me a lot.

Then you can with a curl obtain a token and interact with the API :

curl --request POST \ --url https://login.microsoftonline.com/<id>/oauth2/v2.0/token \ --header 'content-type: application/x-www-form-urlencoded' \ --data client_id=<client_id> \ --data 'client_secret=<client_secret>' \ --data grant_type=client_credentials \ --data scope=<app>/.default

And you can then interact with the API using an "Authorization" header

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by jurajseffer
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jurajseffer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants