Reputation: 1
Using Terraform Unable to authenticate my app via vs code even after giving the right subscription ID, tenant ID, client ID and client secret getting below 401 error
building account: getting authenticated object ID: Error listing Service Principals: autorest.DetailedError{Original:adal.tokenRefreshError{message:"adal: Refresh request failed. Status Code = '401'. Response body: {"error":"invalid_client","error_description":"AADSTS7000222: The provided client secret keys for app '7b1fda96-01aa-4910-ba98-2d5286c1c29d' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds.\\r\\nTrace ID: b056db1f-4bbe-4f3d-a32c-85cf15567800\r\nCorrelation ID: 4b925f8a-9674-455b-91f3-81b7468ca4f9\r\nTimestamp: 2022-03-08 13:22:45Z","error_codes":[7000222],"timestamp":"2022-03-08 13:22:45Z","trace_id":"b056db1f-4bbe-4f3d-a32c-85cf15567800","correlation_id":"4b925f8a-9674-455b-91f3-81b7468ca4f9","error_uri":"https://login.microsoftonline.com/error?code=7000222"} Endpoint https://login.microsoftonline.com/cf626e3e-0aa9-4d45-bb03-cc1e22523cf8/oauth2/token?api-version=1.0", resp:(*http.Response)(0x1ae3e960)}, PackageType:"azure.BearerAuthorizer", Method:"WithAuthorization", StatusCode:401, Message:"Failed to refresh the Token for request to https://graph.windows.net/cf626e3e-0aa9-4d45-bb03-cc1e22523cf8/servicePrincipals?%24filter=appId+eq+%277b1fda96-01aa-4910-ba98-2d5286c1c29d%27&api-version=1.6", ServiceError:[]uint8(nil), Response:(*http.Response)(0x1ae3e960)}
Upvotes: 0
Views: 283
Reputation: 1046
Have you tried doing what the error message suggests?
The provided client secret keys for app '7b1fda96-01aa-4910-ba98-2d5286c1c29d' are expired. Visit the Azure portal to create new keys for your app
Upvotes: 0