Hello @JANKULOSKI Dame -C I O
This example below uses the Azure CLI task in Azure DevOps to run the az functionapp identity assign command. It assigns the "AcrPull" role to the Azure function's system-managed identity, allowing the function to access the container registry in the specified resource group.
You can also use the "az functionapp identity delete" command to delete the Azure function's system-managed identity and create a new one. This can be useful if you are experiencing issues with the current identity.source-group --role AcrPull
- task: AzureCLI@2
inputs:
azureSubscription: 'my-subscription'
scriptType: 'pscore'
scriptLocation: 'inlineScript'
inlineScript: |
az functionapp identity assign --name my-function --resource-group my-resource-group --role AcrPull
For more information on these commands and how to use them, you can refer to the Azure documentation on system-managed identities for Azure functions. https://learn.microsoft.com/en-us/azure/spring-apps/tutorial-managed-identities-functions
I hope this helps! Let me know if you have any other questions.
Please "Accept as Answer" and Upvote if it helped, so that it can help others in the community looking for help on similar topics. Thank you!