To test, we updated the security of the Application User to Sales Manager role which doesn’t have the create incident privilege.
Calling the custom API this time as expected gave us the below error
{“error”:{“code”:”0x80040220″,”message”:”Principal user (Id=0f377e29-5545-eb11-a813-000d3a9bf733, type=8, roleCount=1, privilegeCount=727, accessMode=4), is missing prvCreateIncident privilege (Id=6cf9442b-e690-4cad-8b0a-e60464960b93) on OTC=112 for entity ‘incident’. context.Caller=0f377e29-5545-eb11-a813-000d3a9bf733″}}
If we specify an incorrect privilege name we would get the below error and will not be able to save the record.
Please refer to the post below, which provides a clear explanation of how RetrieveDependenciesForDeleteRequest works and how it can be used to identify dependencies. Discover more from Nishant Rana's Weblog Subscribe to get the latest posts sent to your email. Type your email… Subscribe
Recently, while cleaning up some old customizations in Dynamics 365, we came across an interesting dependency issue that was not immediately obvious from the user interface. What initially looked like a simple Business Process Flow deletion turned into a deeper investigation into how Dataverse manages published dependencies internally. … Continue reading “Troubleshooting Hidden Dependency Errors in Dynamics 365 and Dataverse”
We recently worked on a requirement where we customized an out-of-the-box ribbon button in Dynamics 365 — specifically, the Reactivate Lead button. We had renamed it to ‘Reactivate’ as part of an earlier customization. Below is how the button appeared on the form after customization: Later, we had … Continue reading “Reset / Restore the standard (OOTB) button in Dynamics 365 / Dataverse”
Discover more from Nishant Rana's Weblog
Subscribe to get the latest posts sent to your email.
4 thoughts on “Execute Privilege Name (ExecutePrivilegeName) property of Custom API in Dynamics 365 / Microsoft Dataverse”