-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure US Gov error: resources azruead_group error: Error: Could not retrieve calling principal object "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" #1210
Comments
Hi @wtomaz808, thanks for reporting this issue. Please can you advise which authentication method you are using? Can you also try with the latest provider version (v2.43.0) and advise if you're still getting this error? We may need to see a full debug log in order to determine the cause of the error - if this is the case you will be able to submit it privately as needed. Thanks! |
*This is in happening in Azure US Gov *
azuread_group.test_engineering: Creating... │ |
I am authenticating via azure active directory, I am using/signed in with an identity that was GA access to the tenant & sub this is an internal MSFT custom domain xxxx.onmicrosoft.us in Azure US Gov. I have read there is a compatibility issue with Azure Graph in Azure Gov (??) |
@wtomaz808 Thanks for the info. Usage of the provider in all US Gov environments is supported. It sounds like you're authenticating with a user account via Azure CLI - I'll look into the code and see if I can spot a likely root cause of this error. |
It looks like you're getting a 302 response from the API, with no |
I was able to deploy the resources (azure entra ID security group) by alterring my versions.tf file to following... provider "azuread" { it appears that I had to tell this individual provider that the environment is usgovernment cloud.. Which I assumed was getting configured in my environment variable for azurerm provider. something I did not have to do in Azureses commercial |
@wtomaz808 Thanks for the feedback. How are you setting the environment for AzureRM? You can set the Are you using service principal authentication? |
here is my azureRM block... so you are suggesting replacing environment to ARM_Environment and that variable setting will "carry-over" to the azureAD provider? as well as all other providers? that is very useful to know.. |
We intentionally consume the same environment variables in both the AzureRM and AzureAD providers (links to arguments for reference), to help simplify practitioners' configurations. On most platforms the env vars must be uppercased e.g. If you're using Azure CLI authentication, you'll want to omit the |
Community Note
Terraform (and AzureAD Provider) Version
Terraform v1.6.1
on windows_amd64
Affected Resource(s)
azuread_group
Terraform Configuration Files
Terraform v1.6.1
on windows_amd64
resource "azuread_group" "test_managers" {
display_name = "Education - Managers"
security_enabled = true
}
Copyright (c) Microsoft Corporation.
Licensed under the MIT License.
terraform {
required_version = ">= 1.3"
required_providers {
azuread = {
source = "hashicorp/azuread"
version = "2.40"
}
azurerm = {
}
}
Azure Region Lookup
#----------------------------------------------------------
Azurerm provider configuration
provider "azurerm" {
environment = "usgovernment"
skip_provider_registration = "true"
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
}
Debug Output
Panic Output
Expected Behavior
create azure AD security groups
Actual Behavior
Steps to Reproduce
log into Azure GOV *this isssue is in Azure Gov
Important Factoids
References
The text was updated successfully, but these errors were encountered: