-
Notifications
You must be signed in to change notification settings - Fork 301
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 for AzureAD Enterprise Applications & Proxy Resources #7
Comments
hey @rayterrill Thanks for opening this issue :) Taking a quick look into this - I can't see an API available for this functionality here: https://docs.microsoft.com/en-us/rest/api/resources/ - do you know if it happens to go by another name? Thanks! |
@tombuildsstuff Unfortunately I don't. That's what I was afraid of - given that they just added the PowerShell mechanism to do that work I had a feeling there might not be a public API yet. :( |
Which step are you seeking to manage? The registration of the application or the connectors or both? |
It is not part of AzureRM but part of Graph. According to the Changelog for Graph this was already pushed in September 2016, but I can't really find any clear documentation on it. In the Azure REST API specification you can see some of it pop up as Graph RBAC, which is implemented by the Go SDK. |
@ranieuwe The registration of "Enterprise Applications" in general would be really useful for us. As far as the App Proxy piece, basically everything in the "On-premises application" section (internal URL, external URL, Preauthentication, connector group, etc). https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/application-proxy-publish-azure-portal. Things like being able to add users/groups to the apps, SSO settings, etc would also be beautiful. |
👋🏻 We've just posted a proposal regarding splitting the Azure Active Directory resources out into their own Provider in #2322, which would allow us to ship support for additional AzureAD resources. If you're subscribed to this thread we'd be interested to hear any feedback you may have on the proposal in that thread :) Thanks! |
Hi @rayterrill, As in 2.0 we are deprecating all Azure AD resources and data sources in the Azure RM provider in favour of this new provider I have moved the issue here. |
Is the Azure AD Graph API what is blocking enterprise applications? |
I was able to create Enterprise Application with resource "azuread_service_principal" "this" {
application_id = azuread_application.this.application_id
tags = [
"AppServiceIntegratedApp",
"WindowsAzureActiveDirectoryIntegratedApp",
]
} The tags matter. I had no time to try of both tags are required. |
Just "WindowsAzureActiveDirectoryIntegratedApp". I found that out by manually having created a resource and then importing it in Terraform. |
Forget mining for bitcoins, its golden nuggets like this that deliver real value, thx to the community for sharing. |
@borancar hey, how are you? I haven't found any way of creating this and specifying its details (SAML SSO and Provisioning mappings, for example) through terraform. Best regards, |
Give it a shot - I haven't worked with Azure in a while, so wouldn't know... putting that tag was all that was needed to make the principal into an Enterprise Application. |
Potential docs reference: https://learn.microsoft.com/en-us/graph/application-proxy-configure-api?tabs=http |
Notes from my attempt: Yes https://learn.microsoft.com/en-us/graph/application-proxy-configure-api?tabs=http is the correct doc. First issue: Error with app roles, I commented out the code disabling them to get past it.
Second issue: Third issue:
I commented out the relevant code:
To work around the properties update I created a specific PATCH just for these attributes and I still got the error:
I added broken:
broken response:
working is above without id Code reference: Is there anyway to work around this @manicminer? |
Hi @timja, just adding a +1 to this. Awesome work glad this has got some traction, it'll be a great resource to have in TF |
I've written a blog and a CLI tool using the Graph API to work around this in the meantime: https://blog.timja.dev/how-to-automate-azure-ad-application-proxy-part-2/ https://github.com/hmcts/azure-app-proxy-manager It should be do-able to adapt terraform but it will need changes to the SDK used and I would like @manicminer 's input on that |
I know the graph API requires you to utilize a Microsoft template for Azure ad App proxy type apps. I had to go this route when calling Graph API via power automate to create Azure AD Applications which utilized Application Proxy. there's a static template id for non-gallery azure apps that we may be able to specify via terraform `resource "azuread_application" "example_app" { resource "azuread_service_principal" "example_app" { hope this helps shed some light on this request. |
May you provide an example of a resource creation with the app proxy settings ? |
What do you mean? it's not possible with terraform currently. You need to use the Graph API, or you can take a look at the app I wrote for it: |
I came up with a workaround that works for my use case. you can read more about it here: https://ctejeda.com/documentation/creating-azure-apps-that-utilize-azure-application-proxy-via-terrafrom/ Thanks @timja for shedding some light on this. using the below worked for me as a work around. `terraform { provider "azuread" { client_id = "var.client_id" data "azuread_application_template" "example" { resource "azuread_application" "example" { resource "azuread_service_principal" "example" { provisioner "local-exec" { } ` |
Just posted my official workaround here for anyone still looking for a work around. |
OData pagination handling
Not sure when this was added, but you can now specify this using the higher level feature_tags block: resource "azuread_application" "example" {
display_name = "example"
}
resource "azuread_service_principal" "example" {
client_id = azuread_application.example.client_id
feature_tags {
enterprise = true
}
} The docs linked state that specifying |
Community Note
Description
Create resources to support Enterprise Applications and specifically AzureAD application proxy resources (https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/application-proxy).
We're using this heavily with AzureAD and would love a declarative way to manage them vs creating them with the GUI or the relatively new PowerShell cmdlets.
New or Affected Resource(s)
References
The text was updated successfully, but these errors were encountered: