title: Using Terraform Unable to authenticate my app via vs code
body: <p>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</p>
  <p>building account: getting authenticated object ID: Error listing Service Principals: autorest.DetailedError{Original:adal.tokenRefreshError{message:&quot;adal: Refresh request failed. Status Code = '401'. Response body: {&quot;error&quot;:&quot;invalid_client&quot;,&quot;error_description&quot;:&quot;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: <a href="https://aka.ms/NewClientSecret" rel="nofollow noreferrer">https://aka.ms/NewClientSecret</a>, or consider using certificate credentials for added security: <a href="https://aka.ms/certCreds.%5C%5Cr%5C%5CnTrace" rel="nofollow noreferrer">https://aka.ms/certCreds.\\r\\nTrace</a> ID: b056db1f-4bbe-4f3d-a32c-85cf15567800\r\nCorrelation ID: 4b925f8a-9674-455b-91f3-81b7468ca4f9\r\nTimestamp: 2022-03-08 13:22:45Z&quot;,&quot;error_codes&quot;:[7000222],&quot;timestamp&quot;:&quot;2022-03-08 13:22:45Z&quot;,&quot;trace_id&quot;:&quot;b056db1f-4bbe-4f3d-a32c-85cf15567800&quot;,&quot;correlation_id&quot;:&quot;4b925f8a-9674-455b-91f3-81b7468ca4f9&quot;,&quot;error_uri&quot;:&quot;https://login.microsoftonline.com/error?code=7000222&quot;} Endpoint <a href="https://login.microsoftonline.com/cf626e3e-0aa9-4d45-bb03-cc1e22523cf8/oauth2/token?api-version=1.0%22" rel="nofollow noreferrer">https://login.microsoftonline.com/cf626e3e-0aa9-4d45-bb03-cc1e22523cf8/oauth2/token?api-version=1.0&quot;</a>, resp:(*http.Response)(0x1ae3e960)}, PackageType:&quot;azure.BearerAuthorizer&quot;, Method:&quot;WithAuthorization&quot;, StatusCode:401, Message:&quot;Failed to refresh the Token for request to <a href="https://graph.windows.net/cf626e3e-0aa9-4d45-bb03-cc1e22523cf8/servicePrincipals?%24filter=appId+eq+%277b1fda96-01aa-4910-ba98-2d5286c1c29d%27&amp;api-version=1.6%22" rel="nofollow noreferrer">https://graph.windows.net/cf626e3e-0aa9-4d45-bb03-cc1e22523cf8/servicePrincipals?%24filter=appId+eq+%277b1fda96-01aa-4910-ba98-2d5286c1c29d%27&amp;api-version=1.6&quot;</a>, ServiceError:[]uint8(nil), Response:(*http.Response)(0x1ae3e960)}</p>