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

azuread_application: Add support for custom app roles #75

Closed
aj-devops-wi opened this issue Apr 16, 2019 · 2 comments · Fixed by #98
Closed

azuread_application: Add support for custom app roles #75

aj-devops-wi opened this issue Apr 16, 2019 · 2 comments · Fixed by #98

Comments

@aj-devops-wi
Copy link

aj-devops-wi commented Apr 16, 2019

Community Note

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

Description

This is slightly different than the existing requests (that I can see). This request is for the ability to add custom app roles to an Azure AD App Registration. This can be done programmatically via PowerShell currently, it would be great to have Terraform support.

New or Affected Resource(s)

  • azuread_application
  • azuread_application_group_role
  • azuread_application_user_role

Potential Terraform Configuration

data "azuread_application_group_role" "myCustomGroupRole" {
    name = "myCustomRole"
    azureADGroupName = "MyAzureADGroupName"
    }

data "azuread_application_user_role "myCustomUserRole" {
    name = "myCustomUserRole"
    azureADUserName = "user1@mydomain.com"
}

resource "azuread_application" "test_registration" {
    name                       = "${var.azuread_appname}"
    homepage                   = "${var.azuread_homepage}"
    identifier_uris            = "${var.azuread_identifier_uris}"
    reply_urls                 = "${var.azuread_reply_urls}"
    available_to_other_tenants = "${var.azuread_available_to_other_tenants}"
    oauth2_allow_implicit_flow = "${var.azuread_oauth2_allow_implicit_flow}"
    approles                   = ["${data.azuread_application_group_role.myCustomGroupRole}, ${data.azuread_application_group_role.myCustomUserRole}]
}

References

https://docs.microsoft.com/en-us/powershell/module/azuread/new-azureadgroupapproleassignment?view=azureadps-2.0
https://docs.microsoft.com/en-us/powershell/module/azuread/new-azureaduserapproleassignment?view=azureadps-2.0
https://docs.microsoft.com/en-us/powershell/module/azuread/set-azureadapplication?view=azureadps-2.0

  • #0000
@katbyte katbyte changed the title Add support for custom app roles to App Registration azuread_application: Add support for custom app roles May 23, 2019
@danstis
Copy link

danstis commented May 24, 2019

This should also include the possibility to create an 'application' role. Potentially azuread_application_application_role
For example in PowerShell:
New-AzureADApplicationRole -Name "Application.Access" -Description "Allows application access" -AllowedMemberTypes "Application"

katbyte pushed a commit that referenced this issue Jun 12, 2019
@ghost
Copy link

ghost commented Jul 13, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants