From e7c3a0649a76ad18bc1c83520fcdfbac4c0e36e1 Mon Sep 17 00:00:00 2001 From: Nont Date: Thu, 15 Dec 2022 07:45:41 -0800 Subject: [PATCH] Fix the TenantID for AppLens (#9) * Change to using the environment AppLens tenant ID Add the tenant ID values for the clouds * Remove the blank line Co-authored-by: Nont --- pkg/frontend/adminactions/azureactions.go | 2 +- pkg/util/azureclient/environments.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/frontend/adminactions/azureactions.go b/pkg/frontend/adminactions/azureactions.go index fe7cf9a66..9febb2b67 100644 --- a/pkg/frontend/adminactions/azureactions.go +++ b/pkg/frontend/adminactions/azureactions.go @@ -61,7 +61,7 @@ func NewAzureActions(log *logrus.Entry, env env.Interface, oc *api.OpenShiftClus return nil, err } - fpClientCertCred, err := env.FPNewClientCertificateCredential(subscriptionDoc.Subscription.Properties.TenantID) + fpClientCertCred, err := env.FPNewClientCertificateCredential(env.Environment().AppLensTenantID) if err != nil { return nil, err } diff --git a/pkg/util/azureclient/environments.go b/pkg/util/azureclient/environments.go index 265073284..76a35fed7 100644 --- a/pkg/util/azureclient/environments.go +++ b/pkg/util/azureclient/environments.go @@ -19,6 +19,7 @@ type AROEnvironment struct { AppSuffix string AppLensEndpoint string AppLensScope string + AppLensTenantID string azidentity.AuthorityHost } @@ -31,6 +32,7 @@ var ( AppSuffix: "aro.azure.com", AppLensEndpoint: "https://diag-runtimehost-prod.trafficmanager.net/api/invoke", AppLensScope: "b9a1efcd-32ee-4330-834c-c04eb00f4b33", + AppLensTenantID: "72f988bf-86f1-41af-91ab-2d7cd011db47", AuthorityHost: azidentity.AzurePublicCloud, } @@ -42,6 +44,7 @@ var ( AppSuffix: "aro.azure.us", AppLensEndpoint: "https://diag-runtimehost-prod-bn1-001.azurewebsites.us/api/invoke", AppLensScope: "https://microsoft.onmicrosoft.com/runtimehost", + AppLensTenantID: "cab8a31a-1906-4287-a0d8-4eef66b95f6e", AuthorityHost: azidentity.AzureGovernment, } )