You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if users do not do authentication before they run any cmdlets, we will return a confused error messages. See Azure/azure-powershell#26183 for a real case.
Instead of we should check whether users have login in. If not, we should throw an error like Run Connect-AzAccount to login
Regarding to how to check whether users have login in. We may have following options.
Check whether there is a context through Get-AzContext
Check whether (Get-AzContext).Subscription.Id is null (there is a limitation for this solution, Id could be null in some cases even the users have login in.)
The text was updated successfully, but these errors were encountered:
Currently, if users do not do authentication before they run any cmdlets, we will return a confused error messages. See Azure/azure-powershell#26183 for a real case.
Instead of we should check whether users have login in. If not, we should throw an error like Run Connect-AzAccount to login
Regarding to how to check whether users have login in. We may have following options.
The text was updated successfully, but these errors were encountered: