Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Invalid resource type Microsoft.Web/sites/workflows requesting generic resource with an ResourceIdentifier #42101

Closed
TWolversonReply opened this issue Feb 21, 2024 · 8 comments
Assignees
Labels
ARM customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@TWolversonReply
Copy link

Library name and version

Azure.ResourceManager 1.10.1

Describe the bug

Request ArmClient.GetGenericResource(new ResourceIdentifier(stringVar)) where stringVar is the resource ID of a Logic Apps Standard workflow queried by REST API using $"/subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{webApp}/workflows?api-version=2018-11-01";. I am certain the resource ID is correct as it is the exact value returned by the REST API, and have corroborated this by using az resource show --ids (the id) which works fine. The ID in question is (anonymised):

/subscriptions/{subscription id - verified correct}/resourceGroups/{rg name - verified correct}/providers/Microsoft.Web/sites/{logic app name - verified correct}/workflows/{workflow name - verified correct}

Expected behavior

The resource is returned

Actual behavior

Exception thrown:

InvalidOperationException: Invalid resource type Microsoft.Web/sites/workflows
Azure.ResourceManager.Resources.ResourceProviderCollection.GetApiVersion(ResourceType resourceType, CancellationToken cancellationToken)

Reproduction Steps

Use ArmClient.GetGenericResource with the ID of any Logic App Standard workflow

Environment

Windows 10
.NET SDK:
Version: 8.0.102
Commit: 64f1bc458e
Workload version: 8.0.100-manifests.3097af8b

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.102\

.NET workloads installed:
Workload version: 8.0.100-manifests.3097af8b
[aspire]
Installation Source: SDK 8.0.100, VS 17.9.34310.174
Manifest Version: 8.0.0-preview.1.23557.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.0.0-preview.1.23557.2\WorkloadManifest.json
Install Type: Msi

Host:
Version: 8.0.2
Architecture: x64
Commit: 1381d5ebd2

.NET SDKs installed:
2.2.108 [C:\Program Files\dotnet\sdk]
3.1.426 [C:\Program Files\dotnet\sdk]
6.0.419 [C:\Program Files\dotnet\sdk]
7.0.116 [C:\Program Files\dotnet\sdk]
8.0.100 [C:\Program Files\dotnet\sdk]
8.0.102 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-rc.2.21480.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 21, 2024
@jsquire jsquire added ARM Mgmt This issue is related to a management-plane library. needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Feb 21, 2024
@jsquire
Copy link
Member

jsquire commented Feb 21, 2024

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

@mcgallan mcgallan assigned mcgallan and unassigned HarveyLink Apr 7, 2024
@mcgallan
Copy link
Member

mcgallan commented Apr 7, 2024

Hi @TWolversonReply Thank you for your feedback. I'm sorry, but Microsoft.Web/sites/workflows is indeed an invalid resource type. If it's a Logic Apps Standard workflow, I believe its resource type should be providers/Microsoft.Logic/workflows/{workflowName}, and the API version should be 2016-06-01. Clearly, there is no resource 'workflow' in AppService. The resource ID you provided is obviously an illegal product. I would like to know which REST API you used to get this ID format, so that we can troubleshoot.

@mcgallan mcgallan added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels Apr 7, 2024
Copy link

github-actions bot commented Apr 7, 2024

Hi @TWolversonReply. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

Copy link

Hi @TWolversonReply, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Apr 14, 2024
@TWolversonReply
Copy link
Author

@mcgallan As I described it in the original message.

az rest --url "/subscriptions/$sub/resourceGroups/$rg/providers/Microsoft.Web/sites/$site/workflows?api-version=2018-11-01"

$sub, $rg, $site refer to what you'd expect; the subscription id, the resource group and the site name.

This returns

{
  "id": null,
  "nextLink": null,
  "value": [
    {
      "id": "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Web/sites/<site>/workflows/workflow-ids-tracking",
      "kind": "Stateful",
      "location": "UK South",
      "name": "<site>/workflow-ids-tracking",
      "properties": {
        "flowState": "Enabled",
        "health": {
          "state": "Healthy"
        }
      },
      "type": "Microsoft.Web/sites/workflows"
    },
    {
      "id": "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Web/sites/<site>/workflows/testOracleworkflow",
      "kind": "Stateful",
      "location": "UK South",
      "name": "<site>/testOracleworkflow",
      "properties": {
        "flowState": "Disabled",
        "health": {
          "state": "Healthy"
        }
      },
      "type": "Microsoft.Web/sites/workflows"
    },
    {
      "id": "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Web/sites/<site>/workflows/error-processing",
      "kind": "Stateful",
      "location": "UK South",
      "name": "<site>/error-processing",
      "properties": {
        "flowState": "Enabled",
        "health": {
          "state": "Healthy"
        }
      },
      "type": "Microsoft.Web/sites/workflows"
    },
    {
      "id": "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Web/sites/<site>/workflows/notification",
      "kind": "Stateful",
      "location": "UK South",
      "name": "<site>/notification",
      "properties": {
        "flowState": "Enabled",
        "health": {
          "state": "Healthy"
        }
      },
      "type": "Microsoft.Web/sites/workflows"
    },
    {
      "id": "/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Web/sites/<site>/workflows/system-health",
      "kind": "Stateful",
      "location": "UK South",
      "name": "<site>/system-health",
      "properties": {
        "flowState": "Disabled",
        "health": {
          "state": "Healthy"
        }
      },
      "type": "Microsoft.Web/sites/workflows"
    }
  ]
}

for an example in my current environment. As you can see the "id" properties have the following format:

"id": "/subscriptions//resourceGroups//providers/Microsoft.Web/sites//workflows/"

As far as I am aware, Microsoft.Logic/workflows is only correct for Consumption-tier Logic Apps. A Standard Logic App is an App Service with kind=functionapp,workflowapp - so if a workflow isn't a child resource of that site resource, what is it a child of?

@github-actions github-actions bot added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. labels Apr 18, 2024
@mcgallan
Copy link
Member

HI @TWolversonReply , thank you for your feedback. Regarding your response, I have reconfirmed through Swagger that in the api-version 2018-11-01, there indeed isn't a resource called 'workflows'. However, we will be upgrading the api version of App Service in the near future, at which point we will upgrade to the 2023 api-version. In this version, we have added resources related to workflows. The latest version of AppService (api-version 2021-02-01) indeed does not include content related to workflows. This issue is likely caused by the REST API version and SDK version being out of sync. I believe this issue will be resolved after the new version is released.

@mcgallan mcgallan added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels May 10, 2024
Copy link

Hi @TWolversonReply. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

Copy link

Hi @TWolversonReply, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label May 17, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

5 participants