Prisma Cloud: Azure onboarding Terraform "Error: Error obtaining Authorization Token from the Azure CLI"

Prisma Cloud: Azure onboarding Terraform "Error: Error obtaining Authorization Token from the Azure CLI"

4808
Created On 09/15/22 13:17 PM - Last Modified 07/29/25 14:55 PM


Objective


"Error: Error obtaining Authorization Token from the Azure CLI: Error parsing json result from the Azure CLI: Error waiting for the Azure CLI: exit status 1: ERROR: Tenant shouldn't be specified for Cloud Shell account"
 with provider["registry.terraform.io/hashicorp/azuread"],
│   on terraform (1).tf line 91, in provider "azuread":
│   91: provider "azuread" {
When running the terraform commands in your Azure Cloud shell during the onboarding process. 


Environment


  • Prisma Cloud 
  • Azure Onboarding


Procedure


It seems an issue on Microsoft’s end. When a user runs Terraform, CLI (command Line Interface) does not parse token information and errors out.
Steps to resolve this issue:

  1. Open CLI (Cloud Shell) in Azure and run the following command login to the Azure
$ az login
  1. It will prompt with the link “https://microsoft.com/devicelogin” and the authenticate code
  2. Open the link using your browser and enter the code to authenticate
  3. Now we can run Terraform commands for onboarding
$ terraform init
$ terraform apply

 



Additional Information


View our documentation here to onboard your Azure account via terraform.



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000sZ7jCAE&lang=en_US%E2%80%A9&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language