I'm trying to delete a unpublished Model-Driven App via Power Automate. I'm facing this issue on our company tenant. I've reproduced the same scenario on my own test-tenant, where the same scenario succeed.
Scenario: To list a unpublished app, i've to use an GET 'invoke HTTP request'.
GET invoke http request
After filtering, i'm trying to delete this app:
DELETE
When deleting it in our tenant, i'm facing the following error:
"message": " Sql error: Statement conflicted with a constraint. The DELETE statement conflicted with the REFERENCE constraint "appmodule_appsetting_parentappmoduleid". The conflict occurred in database "db_crmcoreemea_20190221_08310539_4d52", table "dbo.AppSettingBase", column 'ParentAppModuleId'.\r\nThe statement has been terminated. CRM ErrorCode: -2147185375 Sql ErrorCode: -2146232060 Sql Number: 547"
I've tried to delete the ParentAppModuleId, which is impossible.