Azure / Azure/login

v3: Intermittent "No subscriptions found" failure with OIDC login despite subscription-id being provided

Open
#592 10 comments 11 reactions 0 assignees View on GitHub
product enhancement
Dominant language
TypeScript
Stars
552
Forks
440
Avg merge
3d 5h
Merged PRs (30d)
18

Description

When using azure/login@v3 with OIDC (federated credentials) and an explicit `subscription-id` input, the action **intermittently** fails with:
```
Error: No subscriptions found for ***.
Error: Login failed with Error: The process 'C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin\az.cmd' failed with exit code 1. Double check if the 'auth-type' is correct. Refer to https://github.com/Azure/login#readme for more information.
```

### Current behavior
The failure is non deterministic, the same workflow, same SP, same subscription succeeds in parallel jobs within the same run but fails on some.

### Expected
When `subscription-id` is explicitly provided, the action should not fail due to empty subscription enumeration. The subscription ID is already known, there's no need to require successful enumeration before calling `az account set`.

### Potential workaround
Make use of `allow-no-subscriptions: true`, se explanation of it https://github.com/Azure/login/issues/592#issuecomment-4571175080

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.