Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.

Repository from Github https://github.comAzure/azure-sdk-for-javaRepository from Github https://github.comAzure/azure-sdk-for-java

[BUG] Discrepency between "az functionapp list" and "AzureResourceManager.fuctionApps.list()"

jdevilla20 opened this issue · comments

Describe the bug
I have created a FunctionApp via the Azure console. I can view it from both the Azure CLI and the console. However, when I try to view it as a list, from a Scala app using the AzureResourceManager, instead of getting a populated list, my list is empty

Exception or Stack Trace
N/A

To Reproduce

  1. Create a FunctionApp via the console
  2. After deployed, verify it exists by running the CLI
    az functionapp list --resource-group
  3. Try doing the same via the ResourceManager code, I get an empty list

I am creating the FunctionApp on the CLI as myself, using a Contributor role. The managed role is using both Contributor and Reader

Code Snippet
`

  val azure = AzureResourceManager.authenticate(credential, profile).withSubscription(params.azureSubscriptionId)

  val networks = azure.networks().list().asScala // This works fine

  val test = azure.functionApps().list().asScala.toList // This should return values, but is empty

`

Expected behavior
My function should show up via the Scala app

** Error Message **
When I try to examine the FunctionApp object via Intellij, I see
Method threw 'com.azure.core.implementation.http.rest.MissingRequiredAnnotationException' exception. Cannot evaluate jdk.proxy5.$Proxy62.toString()

Setup (please complete the following information):

  • Library/Libraries: com.azure.resourcemanager:azure-resourcemanager:2.39.0
    com.azure.resourcemanager:azure-resourcemanager-appservice:2.39.0
  • Java version: [e.g. 8] 21

Additional context
The CLI is as myself as a Contributor role. The Scala app is a managed identity with both Contributor/Reader roles.

Thank you for your feedback. Tagging and routing to the team member best able to assist.

Please close this. User error.