When requesting an access token with az account get-access-token ...
in GitHub Actions, the output (e.g. accessToken
) is masked, even in the raw logs.
How can I unmask the output, so that I'm able to inspect the values for PoC work?
.github/workflows/azure-login.yaml
:
name: Run Azure Login with OIDC
on: [push]
permissions:
id-token: write
contents: read
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: "Az CLI login"
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
allow-no-subscriptions: true
- name: "Run az commands"
run: |
az account get-access-token --resource=${{ secrets.AZURE_CLIENT_ID }} --scope=api://${{ secrets.AZURE_TARGET_API }}/.default
Output: