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

Support to assign license for group #288

Closed

Conversation

kenchan0130
Copy link
Contributor

Motivation

I'd like to fix the hashicorp/terraform-provider-azuread#745 issue

@kenchan0130 kenchan0130 force-pushed the support-group-assignlicense branch from 6f6285c to 2dfde31 Compare August 2, 2024 07:12
testGroupsClient_AssignLicense(t, c, *group.ID(), &[]msgraph.GroupAssignedLicense{
{
DisabledPlans: &[]string{},
SkuId: utils.StringPtr("90d8b3f8-712e-4f7b-aa1e-62e7ae6cbe96"), // SMB_APPS
Copy link
Contributor Author

@kenchan0130 kenchan0130 Aug 2, 2024

Choose a reason for hiding this comment

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

GroupsClient.AssignLicense(): GroupsClient.BaseClient.Post(): unexpected status 400 with OData error: Request_BadRequest: License 90d8b3f8-712e-4f7b-aa1e-62e7ae6cbe96 does not correspond to a valid company License.

Please let me know the appropriate SKUS ID as I did not know the proper ID to use for the test.

ref: https://learn.microsoft.com/en-us/entra/identity/users/licensing-service-plan-reference

@manicminer
Copy link
Owner

Hi @kenchan0130, thanks for this and your other contributions to the SDK. At this time, I am not merging any further PRs here as I am going to deprecate this project imminently. 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. 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 an AssignLicense() method in the microsoft-graph/groups/stable/group package, which implements this functionality.

As such, I'm going to close this PR, as the AzureAD provider has migrated to the new SDK and is no longer using this project. Thanks again!

@manicminer manicminer closed this Sep 24, 2024
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