Azure / Azure/azure-powershell
[Feature]: Make GET Subscription REST Operation Optional in Connect-AzAccount
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
### Description of the new feature
Currently, the Connect-AzAccount command performs the [Subscriptions - Get](https://learn.microsoft.com/en-us/rest/api/resources/subscriptions/get?view=rest-resources-2022-12-01&tabs=HTTP) operation during the login process. This behavior occurs regardless of whether the -access-token parameter or the -subscription parameter is used.
Making the Subscriptions - Get operation mandatory has caused issues in the past. For instance, during an Azure Resource Graph (ARG) outage, the Subscriptions - Get operation failed, which in turn caused the Connect-AzAccount command to fail completely.
This resulted in business-critical PowerShell commands being unable to log in to Azure at all.
Therefore, I request that the Connect-AzAccount command be modified to create an authentication context object without requiring the success of the Subscriptions - Get operation. This change would allow subsequent commands to execute even if the Subscriptions - Get operation fails.
For my customer's case, the subsequent command after Connect-AzAccount was as follows:
https://learn.microsoft.com/en-us/powershell/module/az.datafactory/invoke-azdatafactoryv2pipeline?view=azps-13.0.0&viewFallbackFrom=azps-12.3.0
### Proposed implementation details (optional)
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.