azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Trailing slash on issuer URL causes issues

Open mluker opened this issue 3 years ago • 2 comments

The trailing slash on the issuer URL in the code sample will cause the federated credential to not work when leveraging the azure/login action in a pipeline. The error it throws is "AADSTS70021: No matching federated identity record found for presented assertion".

Removing the trailing slash fixes it and works as expected.

Description Documentation update when using az ad app federated-credential create to create a federated credential.

The official GitHub documents also call this out as not having a trailing slash https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#:~:text=(Issuer)%20The%20issuer%20of%20the%20OIDC%20token%3A%20https%3A//token.actions.githubusercontent.com

This checklist is used to make sure that common guidelines for a pull request are followed.

mluker avatar Jan 19 '23 15:01 mluker

Thank you for your contribution mluker! We will review the pull request and get back to you soon.

ghost avatar Jan 19 '23 15:01 ghost

role

yonzhan avatar Jan 20 '23 02:01 yonzhan