手順概要
- Azure の EntraID でアプリを作成
- GitHub Actions で Azure に認証する
- name: az Login uses: azure/login@v1 with: client-id: ${{ secrets.AZURE_CLIENT_ID }} tenant-id: ${{ secrets.AZURE_TENANT_ID }} subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- Actions のワークフローを実行
- エラーが発生
Error: AADSTS70025: The client '***'(アプリ名) has no configured federated identity credentials. Trace ID: xxxxxx-xxx-xxx Correlation ID: xxxxxx-xxx-xxx Timestamp: 2025-03-06 23:46:45Z Error: Interactive authentication is needed. Please run: az login Error: Login failed with Error: The process '/usr/bin/az' failed with exit code 1. Double check if the 'auth-type' is correct. Refer to https://github.com/Azure/login#readme for more information.
原因と対応
- アプリのフェデレーション資格情報に不備がある
- アプリの 管理>証明書とシークレット>フェデレーション資格情報 を選択して必要な情報を追加する
- GitHub Actions の場合は「Azure リソースをデプロイする GitHub Actions」を選択する