Home > Enterprise >  Issue with Application ID URI in Azure AD App registration , while using Terraform
Issue with Application ID URI in Azure AD App registration , while using Terraform

Time:12-04

I am trying to modify my application identifier URI from the format : "https://app-contoso.api-qa.contoso.onmicrosoft.com" to the format "api://(app id)" I am using Terraform to do this. So if i just use :

application_identifier_uris   = [format("api://%s", random_uuid.contoso-api-app.result)]

i get a random id and not the actual app ID. How do i ensure that i get the actual App ID in the format "api://(app ID)" I have to use a random uuid as i get a cyclic error in Terraform if i refer the output of the app ID from my application module.

I am using our own application module to do app registration

CodePudding user response:

i get a random id and not the actual app ID. How do i ensure that i get the actual App ID in the format "api://(app ID)" I have to use a random uuid as i get a cyclic error in Terraform if i refer the output of the app ID from my application module.

You are generating a random GUID and assigning the value there , so for that reason you will be getting random ID and not the actual app ID. As for the Cyclic Error you will be receiving error something like below image if you use a reference to AppID as the application is getting created the same time when you referencing it so after creation only the application id will be usable or identified.

enter image description here

So, the above is not possible from terraform for now ,as you already know there has been a Feature flag or Enhancement raised for the same in this enter image description here

  • Related