The syntax of the resourceid function is as follows:
In its basic form, we need to provide just two pieces of information to the resourceId function: Resource type and resource name. We must add add subscription id and resource group name in situations where the resource is in a different resource group.
Example: KeyVaultAccessPolicy that references API Management instance:
resourceId(subscription().subscriptionId, resourceGroup().name, ‘Microsoft.ApiManagement/service’, parameters(‘apiManagementName’))
Note that in this case subscriptionId and resourceGroupName could have been left out, because KeyVault and API Management are in the same resourcegroup. I left the example as is, because it shows the correct syntax. The short notation would be:
You can use the Resource Explorer in the Azure Portal to find the ID of a resource.