Error message"Failed to refresh the Token for request to" when terraform plan

Zhao Mingyang (GI-DE) 20 Reputation points

After I excute command: terraform plan, the error message:

Error: building account: getting authenticated object ID: Error listing Service Principals: autorest.DetailedError{Original:(*errors.errorString)(0xc001d660c0), PackageType:"azure.BearerAuthorizer", Method:"WithAuthorization", StatusCode:0, Message:"Failed to refresh the Token for request to", ServiceError:[]uint8(nil), Response:(*http.Response)(nil)}

Microsoft Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
2,865 questions
Microsoft Graph Applications API
Microsoft Graph Applications API
A Microsoft API that enables you to manage these resources and actions related to applications in Azure Active Directory.
492 questions
No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 20,376 Reputation points

    Hi @Zhao Mingyang (GI-DE)

    Azure AD graph has been deprecated and will be completely retired by June 30 of this year, and all features of Azure AD graph have been migrated to the latest Microsoft Graph, so I recommend that you use the Microsoft Graph API to get an application service principal.

    GET$filter=appId eq '{app id}'

    User's image

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

0 additional answers

Sort by: Most helpful