You can also use SDK to use Azure AI foundry Agents
Regarding permission on issue on logic app.
Please follow the pre-requisites here (we need to enable system assigned identity on logic app and add that as AI project manager on AI foundry resources)
Thank you