On my Azure account, I have setup 2 FunctionApps as myself. I am doing this via the Contributor role. I can view it via the CLI:
az functionapp list --resource-group <my subscription>
I am trying to do the same via a Scala app. The identity has both the Contributor and the Reader roles, so it should be able to read all resources.
val profile = new AzureProfile(params.azureTenantId, params.azureSubscriptionId, AzureEnvironment.AZURE)
val credential = params.getCredential()
val azure = AzureResourceManager.authenticate(credential, profile).withSubscription(params.azureSubscriptionId)
When looking for VMs or VPCs, I get return values. However, when I try to do the same with FunctionApps, I get an empty list. I am expecting the same results as the CLI call:
val test = azure.functionApps().list().asScala.toList
logger.error("Test length is "+test.size)
In this case, I end up with an empty list. Both the CLI and the Scala app are using the Contributor / Reader roles, but the Scala app is not returning values.
Am I missing something?




azure.functionApps().listByResourceGroup("<resource-group-name>").