Skip to content

Commit e7ffa92

Browse files
committed
ci: Force Subscription Load During Login
1 parent a805072 commit e7ffa92

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cli/azd/cmd/auth_login.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ func (la *loginAction) Run(ctx context.Context) (*actions.ActionResult, error) {
338338
return nil, err
339339
}
340340

341-
if la.flags.clientID == "" {
341+
if v, err := strconv.ParseBool(os.Getenv("AZD_DEBUG_LOGIN_FORCE_SUBSCRIPTION_REFRESH")); (err == nil && v) || la.flags.clientID == "" {
342342
// Update the subscriptions cache for regular users (i.e. non-service-principals).
343343
// The caching is done here to increase responsiveness of listing subscriptions in the application.
344344
// It also allows an implicit command for the user to refresh cached subscriptions.

eng/pipelines/templates/jobs/build-cli.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ jobs:
101101
AZURESUBSCRIPTION_TENANT_ID: $(AzureSubscriptionTenantId)
102102
AZURESUBSCRIPTION_SERVICE_CONNECTION_ID: $(AzureSubscriptionServiceConnectionId)
103103
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
104+
AZD_DEBUG_LOGIN_FORCE_SUBSCRIPTION_REFRESH: true
104105
displayName: AZD Login
105106
106107
- task: AzureCLI@2

0 commit comments

Comments
 (0)