-
Notifications
You must be signed in to change notification settings - Fork 302
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
Enable azuread_group to return indirect members #881
Comments
The current "groups List Members" method and client from Hamilton does not currently allow for this query to be passed through but would be relatively easy to implement: |
Noting here that manicminer/hamilton#191 has been merged, and transitive members can now be included in terraform's azuread_group data source. @Threpio please advise if a new issue should be opened for this functionality. |
Woops, looks like this was closed prematurely :) |
hack to work around transitive member retrieval limitations in AzureAD provider in terraform, Open Issue: hashicorp/terraform-provider-azuread#881 Usage: supply group ID in command, returns all transitive members in form {"value":"comma,separated,list,of,members"} for easy terraform progam integration.
I'm just discovering this open issue, while searching for a solution to this problem. At the moment, is there any way that this can be utilized in its current state? |
#2) * Add optional transitive members in group data source * Run terrafmt * Copy release conf from terraform-provider-hashicups
I ended up publishing my own version... terraform {
required_providers {
azuread = {
source = "TomasKunka/azuread"
version = "2.48.0"
}
}
}
data "azuread_group" "example" {
display_name = "example"
include_transitive_members = true
}
output "group_members" {
value = data.azuread_group.example.members
} |
Feature: #881 Enable azuread_group to return indirect members
Community Note
Description
Currently the azuread_group data source only returns direct members of the group. It would be helpful to be able to also get all transitive members of that group. I see that Microsoft Graph has the API https://graph.microsoft.com/v1.0/groups/GROUP_ID/transitiveMembers which could be leveraged for this.
The existing data source could be updated as shown below or a new data source could be created.
New or Affected Resource(s)
Potential Terraform Configuration
data "azuread_group" "example" {
display_name = "Group Name Here"
include_members = "transitive"
}
References
The text was updated successfully, but these errors were encountered: