Skip to content
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

Groups: Add GetTransitiveMembers #289

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

antonjah
Copy link

This PR extends the project to include transitive listing of group members as msgraph.User. The addition of this method should not be confused with ListTransitiveMembers as it returns a *[]string, which forces the user to first list, and then get each individual member by ID.

More information about the transitiveMembers endpoint can be found here

This PR extends the project to include transitive listing of group members as `msgraph.User`.
The addition of this method should not be confused with `ListTransitiveMembers` as it returns a `*[]string`, which forces the user to first list, and then get each individual member by ID.

More information about the `transitiveMembers` endpoint can be found [here](https://learn.microsoft.com/en-us/graph/api/group-list-transitivemembers?view=graph-rest-1.0&tabs=http)
Copy link
Owner

@manicminer manicminer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @antonjah! I'll happily merge this, but please note that I am going to deprecate this project very soon. We (HashiCorp) recently released a Microsoft Graph SDK that is now being used exclusively in the Terraform AzureAD provider instead of this SDK.

I encourage you to take a look at https://github.com/hashicorp/go-azure-sdk/tree/main/microsoft-graph and consider migrating your project. Many of the same paradigms have been implemented in the new SDK, with many improvements, and because the new SDK is auto-generated, it has massively more coverage.

For this use case, the new SDK has a ListTransitiveMembers() method in the microsoft-graph/users/stable/transitivemember package, which returns a []DirectoryObject - which itself is an interface with automatic type discrimination, so you can retrieve users, groups, service principals etc in the same request.

@manicminer manicminer merged commit b56bd77 into manicminer:main Sep 24, 2024
1 of 2 checks passed
@manicminer manicminer modified the milestones: v0.71.0, v0.72.0 Sep 24, 2024
@antonjah
Copy link
Author

antonjah commented Sep 26, 2024

Thanks for this @antonjah! I'll happily merge this, but please note that I am going to deprecate this project very soon. We (HashiCorp) recently released a Microsoft Graph SDK that is now being used exclusively in the Terraform AzureAD provider instead of this SDK.

I encourage you to take a look at https://github.com/hashicorp/go-azure-sdk/tree/main/microsoft-graph and consider migrating your project. Many of the same paradigms have been implemented in the new SDK, with many improvements, and because the new SDK is auto-generated, it has massively more coverage.

For this use case, the new SDK has a ListTransitiveMembers() method in the microsoft-graph/users/stable/transitivemember package, which returns a []DirectoryObject - which itself is an interface with automatic type discrimination, so you can retrieve users, groups, service principals etc in the same request.

I will definitely look into that, thanks! :-)

We were trying to migrate from the official(?) msgraph-sdk-go library since it was a pita to work with because of it being generated and probably being the largest go project I have ever seen, leaving us with really bad compile times without a cache available, and very large binaries. Hoping this is something that the above mentioned project can solve.

Again, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants