Cannot create AAD group in terraform

Kasun Amarasinghe 1 Reputation point
2021-10-29T20:19:42.973+00:00

│ Error: Could not retrieve calling principal object "7c92453f-10f5-45f0-a2de-29807aa57200"

│ with azuread_group.engineers,
│ on groups.tf line 25, in resource "azuread_group" "engineers":
│ 25: resource "azuread_group" "engineers" {

│ ODataId was nil

Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
942 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,473 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Gustav Lasko 6 Reputation points
    2022-10-26T15:29:14.507+00:00

    Upgrading to azuread provider 2.29.0 has resolved this error:

    terraform {  
      required_providers {  
        azuread = {  
          source  = "hashicorp/azuread"  
          version = "~> 2.29.0"  
        }  
      }  
    }  
    
    1 person found this answer helpful.

  2. James Hamil 21,696 Reputation points Microsoft Employee
    2021-10-30T00:27:16.75+00:00

    Hi @Kasun Amarasinghe , are you following a document or tutorial for this? It looks like you have a null value somewhere, but I need more information to pinpoint it. Please let me know.

    Best,
    James