Hi Benedikt Schmitt,
Thank you reaching out to Microsoft Q&A.
I have tested the same by trying to run Standard Logic App workflow using LogicManagementClient, and got the same error:
(env) PS C:\logic-app-test> py logic_app_test.py
Error: (ResourceNotFound) The Resource 'Microsoft.Logic/workflows/stateless1' under resource group 'testrg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.Logic/workflows/stateless1' under resource group 'testrg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
This error occurs when you try to use workflows.get() or workflowRuns.get() on a Standard Logic App, because the SDK only queries the Logic resource provider, not the Web App resource provider where Standard Logic Apps live.
The SDK is calling the ARM API looking for a resource like:
Microsoft.Logic/workflows/workflowname
But Standard Logic Apps are deployed as App Service resources Microsoft.Web/sites/workflows instead of Microsoft.Logic/workflows which the SDK targets. Azure SDK LogicManagementClient doesn't support Standard Logic Apps
/subscriptions/subscriptionid/resourceGroups/rg/providers/Microsoft.Web/sites/logicappname
- SDK methods like
get(),run(), orlist()only work with Consumption Logic Apps. - For Standard Logic Apps, you need to use HTTP endpoints and monitor them through Application Insights or Runs History in the portal.
Example:
import aiohttp
import asyncio
trigger_url = "workflow_url"
async def trigger_logic_app():
async with aiohttp.ClientSession() as session:
async with session.post(trigger_url, json={"input": "value"}) as resp:
print(f"HTTP status: {resp.status}")
content_type = resp.headers.get("Content-Type", "")
if "application/json" in content_type:
data = await resp.json()
run_id = data.get("runId")
print(f"Workflow started with runId: {run_id}")
return run_id
else:
text = await resp.text()
print("Non-JSON response received:")
print(text)
return None
asyncio.run(trigger_logic_app())
Hope it helps!
Please do not forget to click "Accept the answer” and Yes, this can be beneficial to other community members.
If you have any other questions, let me know in the "comments" and I would be happy to help you.