Failed to destroy Azure IPI OpenShift Container Platform 4: Invalid client secret is provided.

Solution Verified - Updated -

Issue

  • Not able to destroy Azure IPI OpenShift Container Platform 4 cluster using the destruction of the cluster as it is failing on authorization for the resource deletion:
INFO Credentials loaded from file "/home/openshift/.azure/osServicePrincipal.json"
FATAL Failed to destroy cluster: [unable to authenticate when deleting public DNS records: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://management.azure.com/subscriptions/xx/resourceGroups/xxx/providers/Microsoft.Network/dnsZones?%24top=100&api-version=2018-03-01-preview: StatusCode=401 -- Original Error: adal: Refresh request failed. Status Code = '401'. Response body: {"error":"invalid_client","error_description":"AADSTS7000215: Invalid client secret is provided.\r\nTrace ID:  ec65b703-b4fe-6c78-bcea-ddd2af041c00\r\nCorrelation ID: 2a04765f-ae9a-7b89-95c5-2cd7bdb98cef\r\nTimestamp: 2021-03-02 16:49:59Z","error_codes":[7000215],"timestamp":"2021-03-02 16:49:59Z","trace_id":" ec65b703-b4fe-6c78-bcea-ddd2af041c00","correlation_id":"2a04765f-ae9a-7b89-95c5-2cd7bdb98cef","error_uri":"https://login.microsoftonline.com/error?code=7000215"}, unable to authenticate when deleting resource group: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://management.azure.com/subscriptions/xxx-33a96f170a7a/resourcegroups/dev-xxx?api-version=2018-05-01: StatusCode=401 -- Original Error: adal: Refresh request failed. Status Code = '401'. Response body: {"error":"invalid_client","error_description":"AADSTS7000215: Invalid client secret is provided.\r\nTrace ID: bc5d8787-250d-4cbc-6fa1-451aafa61d00\r\nCorrelation ID: e29350bc-9fea-4097-8fc3-1dc2506d5c3a\r\nTimestamp: 2021-03-02 16:49:59Z","error_codes":[7000215],"timestamp":"2021-03-02 16:49:59Z","trace_id":"bc5d8787-250d-4cbc-6fa1-451aafa61d00","correlation_id":"e29350bc-9fea-4097-8fc3-1dc2506d5c3a","error_uri":"https://login.microsoftonline.com/error?code=7000215"}]

Environment

  • Red Hat OpenShift Container Platform 4.x [OCP].
  • Microsoft Azure.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content