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

Added support for assigning licenses to a user or group #745

Open
alagae opened this issue Feb 24, 2022 · 3 comments
Open

Added support for assigning licenses to a user or group #745

alagae opened this issue Feb 24, 2022 · 3 comments

Comments

@alagae
Copy link

alagae commented Feb 24, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritise this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritise the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Added support for assigning licenses to a user or group

New or Affected Resource(s)

  • azuread_group
  • azuread_user

Potential Terraform Configuration

resource "azuread_user" "example" {
  user_principal_name = "jdoe@hashicorp.com"
  display_name        = "J. Doe"
  mail_nickname       = "jdoe"
  password            = "SecretP@sswd99!"
  usage_location      = "GB"

  licenses = {
    disabledPlans = [
      "113feb6c-3fe4-4440-bddc-54d774bf0318",
      "14ab5db5-e6c4-4b20-b4bc-13e36fd2227f",
    ]
    sku = "b05e124f-c7cc-45a0-a6aa-8cf78c946968"
  }

  licenses = {
    disabledPlans = [
      "a413a9ff-720c-4822-98ef-2f37c2a21f4c"
    ]
    sku = "c7df2760-2c81-4ef7-b578-5b5392b571df"
  }
}

resource "azuread_group" "example" {
  display_name     = "example"
  security_enabled = true

  licenses = {
    disabledPlans = [
      "113feb6c-3fe4-4440-bddc-54d774bf0318",
      "14ab5db5-e6c4-4b20-b4bc-13e36fd2227f",
    ]
    sku = "b05e124f-c7cc-45a0-a6aa-8cf78c946968"
  }

  licenses = {
    disabledPlans = [
      "a413a9ff-720c-4822-98ef-2f37c2a21f4c"
    ]
    sku = "c7df2760-2c81-4ef7-b578-5b5392b571df"
  }
}

References

Microsoft Graph

https://docs.microsoft.com/en-us/graph/api/user-assignlicense?view=graph-rest-1.0&tabs=http

https://docs.microsoft.com/en-us/graph/api/group-assignlicense?view=graph-rest-1.0&tabs=http

SKU and Service Plan GUIDs

https://docs.microsoft.com/en-us/azure/active-directory/enterprise-users/licensing-service-plan-reference)

@ruhomor

This comment was marked as off-topic.

@breisig
Copy link

breisig commented Mar 9, 2024

Any update on this? This would be VERY useful!

@kyoyar
Copy link

kyoyar commented Mar 21, 2024

I eagerly await the day this becomes available!

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

No branches or pull requests

5 participants