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:
- Open CLI (Cloud Shell) in Azure and run the following command login to the Azure
$ az login
- It will prompt with the link “https://microsoft.com/devicelogin” and the authenticate code
- Open the link using your browser and enter the code to authenticate
- 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.