Skip to content

Commit 2f52f8f

Browse files
edwardrfedw-defang
andauthored
Use defang cli client id for azure login (#2102)
* Use defang cli client id for azure login * Update comments --------- Co-authored-by: Edward J <edw@defang.io>
1 parent c8d86a1 commit 2f52f8f

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/pkg/clouds/azure/login.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ import (
2424
const (
2525
// managementScope is the OAuth2 scope for ARM (management plane) calls.
2626
managementScope = "https://management.azure.com/.default"
27-
// azureCLIClientID is Microsoft's public client ID for Azure CLI. Using
28-
// it means the user sees the same consent prompt they would from
29-
// `az login --use-device-code`, and we don't need to register our own app.
30-
azureCLIClientID = "04b07795-8ddb-461a-bbee-02f9e1bf7b46"
27+
// defangCLIClientID is defang's public client ID for Azure CLI.
28+
defangCLIClientID = "e6b89a2c-82c7-4072-85e5-9ee7e838d5cf"
3129
// defaultTenant routes through Microsoft's "organizations" tenant so any
3230
// work/school account can authenticate when we can't discover the
3331
// subscription's specific tenant.
@@ -158,7 +156,7 @@ func (a *Azure) Authenticate(ctx context.Context, interactive bool) error {
158156
}
159157
}
160158

161-
client, err := public.New(azureCLIClientID,
159+
client, err := public.New(defangCLIClientID,
162160
public.WithAuthority("https://login.microsoftonline.com/"+tenant),
163161
public.WithCache(&defangMSALCache{store: a.TokenStore, key: msalCacheKey}),
164162
)

0 commit comments

Comments
 (0)