In the previous post, we created a simple custom API https://nishantrana.me/2021/01/13/use-custom-api-to-create-custom-messages-in-dynamics-365/
Let us look at its different properties starting with ExecutePrivilegeName
Execute Privilege Name attribute of custom API allows us to specify the name of the privilege that allows execution of the custom API.
Let us update the custom API and specify the privilege name.
For simplification, we have used prvCreateIncident here i.e. Create Case / Incident Privilege.
To get the Privilege name
https://%5Borgname%5D.api.crm.dynamics.com/api/data/v9.1/privileges?$select=name
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.
Hope it helps..
Action ‘Update_a_record’ failed: An error has occurred. No resources were found when selecting for update – Fixing Cross-Company Update Issues in Finance & Operations Using Dataverse Virtual Entities (Power Automate) by Nishant Rana
December 2, 2025 Recently, while trying to update the Projects table in Finance & Operations using the Fin & Ops Apps actions in Power Automate, we ran into below error: An error has occurred. No resources were found when selecting for update. After digging deeper, we realised the issue had nothing …
Continue reading “Action ‘Update_a_record’ failed: An error has occurred. No resources were found when selecting for update – Fixing Cross-Company Update Issues in Finance & Operations Using Dataverse Virtual Entities (Power Automate)”
Fixing the “Only 1 of 2 keys provided for lookup, provide keys for dataAreaId, ProjectID / Not found” Error in Power Automate (Fin & Ops Apps) by Nishant Rana
November 25, 2025 Recently, while working with the Projects table from a Finance & Operations (F&O) environment, we ran into an error while using the Get a record action in Power Automate. (BTW this was the first we were using the Fin & Ops connector) The flow kept failing with the …
Continue reading “Fixing the “Only 1 of 2 keys provided for lookup, provide keys for dataAreaId, ProjectID / Not found” Error in Power Automate (Fin & Ops Apps)”
Fixed – Error occurred while loading document template / Error occurred while loading preview error in Dynamics 365 by Nishant Rana
November 18, 2025 Recently, one of the users reported the following error while trying to generate a PDF for a Quote record in Dynamics 365: Initially, the Export to PDF option was showing a blank list of templates. This happened because the user was missing a few essential privileges on the …
Continue reading “Fixed – Error occurred while loading document template / Error occurred while loading preview error in Dynamics 365”
How to Identify and Update Power Automate HTTP Request Trigger Flows Before November 2025 by Nishant Rana
November 12, 2025 Few weeks back, while working on one of our Power Automate flows, we noticed a banner warning on the HTTP Request trigger step. Microsoft has announced that starting August 2025, all flows using HTTP or Teams Webhook triggers with logic.azure.com URLs will move to a new endpoint under …
Continue reading “How to Identify and Update Power Automate HTTP Request Trigger Flows Before November 2025”
Using Parent Context in Dynamics 365 Plugins — Detecting System-Triggered Operations (Dataverse / Dynamics 365) by Nishant Rana
November 11, 2025 In this post, we’ll look at how we used the ParentContext property in Dynamics 365 plugins to determine if a plugin execution was triggered by another plugin and perform logic conditionally. This came up in two real-world cases — one where we needed to prevent duplicate Sales Leads …
Continue reading “Using Parent Context in Dynamics 365 Plugins — Detecting System-Triggered Operations (Dataverse / Dynamics 365)”
Fixed – “Action cannot be performed. This quote is not owned by Dynamics 365 Sales” in Dataverse / Dynamics 365 by Nishant Rana
November 5, 2025 Recently, while working with Quotes in Dynamics 365 Sales integrated with Supply Chain Management (SCM) through Dual-write, we encountered an interesting error while trying to activate an existing quote. When attempting to activate Quote, the system threw the following error message: Checking the Plugin Trace Log, we found …
Continue reading “Fixed – “Action cannot be performed. This quote is not owned by Dynamics 365 Sales” in Dataverse / Dynamics 365”
Understanding “Block Deletion of Out-of-the-box Attribute Maps” in Dataverse / Dynamics 365 by Nishant Rana
November 4, 2025 In Dynamics 365, attribute maps define how data flows from one record to another when creating related records. For example, when creating a Contact from an Account, fields like Address, Phone Number, and Website are copied automatically through predefined mappings. These mappings are part of standard Microsoft solutions …
Continue reading “Understanding “Block Deletion of Out-of-the-box Attribute Maps” in Dataverse / Dynamics 365”
Flows getting triggered multiple times / missing callbackregistration record – Power Automate / Dataverse by Nishant Rana
October 23, 2025 Recently, we observed that one of our flows was getting triggered multiple times in our UAT environment; however, the flow was working properly in our Development environment. On comparing the flows trigger, we didn’t find any differences. However, when checking for the callbackregistration record, we observed that for …
Continue reading “Flows getting triggered multiple times / missing callbackregistration record – Power Automate / Dataverse”
JavaScript Gotcha: Why [x == (a || b)] Fails by Nishant Rana
October 15, 2025 Recently we observed that our JavaScript code was not working as expected. Now when we write conditions in JavaScript, it’s natural to want to check if a variable equals one of multiple values. A common mistake is to write the condition like this: At first glance, it seems …
Continue reading “JavaScript Gotcha: Why [x == (a || b)] Fails”
What are Partial Merges in Business Process Flow (BPF), and what can we do about it – Dataverse / Dynamics 365 by Nishant Rana
October 14, 2025 Let’s take an example. Suppose we have the following Business Process Flow (BPF) for Leads: If the Lead Type = Grade A, we want the Grade A Details stage to appear. For other grades (B, C, D), we skip that stage and continue. So far, this is simple. …
Continue reading “What are Partial Merges in Business Process Flow (BPF), and what can we do about it – Dataverse / Dynamics 365”
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”