Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.5k stars 4.92k forks source link

It failed to create Logic App Workflow with accessControl.triggers #16018

Open neil-yechenwei opened 2 years ago

neil-yechenwei commented 2 years ago

After tested, I found api failed to create Logic App Workflow with accessControl.triggers and threw below error message. Per the error, I assume the openAuthenticationPolicies.type should be set to AAD while creating this resource with "Triggers". But after checked swagger, seems openAuthenticationPolicies.type is marked as read-only in swagger so that we cannot set it as AAD in request body. Service team confirmed it's a bug in swagger.

Error message:

logic.WorkflowsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="OnlyAADOAuthTypeSupported" Message="OAuth authentication policy 'testpolicy1' in access control configuration of workflow is not valid. The 'type' property of authentication policy should be set to AAD."
ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-logicapps-team.

Issue Details
After tested, I found api failed to create [Logic App Workflow](https://github.com/Azure/azure-rest-api-specs/blob/55d29f1945c8486073b981680da3ddc53d46ce07/specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/logic.json#L207) with [`accessControl.triggers`](https://github.com/Azure/azure-rest-api-specs/blob/55d29f1945c8486073b981680da3ddc53d46ce07/specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/logic.json#L8956) and threw below error message. Per the error, I assume the [`openAuthenticationPolicies.type`](https://github.com/Azure/azure-rest-api-specs/blob/55d29f1945c8486073b981680da3ddc53d46ce07/specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/logic.json#L9015) should be set to `AAD` while creating this resource with "Triggers". But after checked swagger, seems `openAuthenticationPolicies.type` is marked as [read-only](https://github.com/Azure/azure-rest-api-specs/blob/55d29f1945c8486073b981680da3ddc53d46ce07/specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/logic.json#L9021) in swagger so that we cannot set it as `AAD` in request body. Service team confirmed it's a bug in swagger. Error message: ``` logic.WorkflowsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="OnlyAADOAuthTypeSupported" Message="OAuth authentication policy 'testpolicy1' in access control configuration of workflow is not valid. The 'type' property of authentication policy should be set to AAD." ```
Author: neil-yechenwei
Assignees: akning-ms
Labels: `Logic App`, `Service Attention`, `needs-triage`
Milestone: -