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..
Advancing and Finishing a BPF Using RetrieveProcessInstancesRequest and RetrieveActivePathRequest (Dataverse / Dynamics 365) by Nishant Rana
January 14, 2026 In earlier posts, we looked at how to move a Business Process Flow (BPF) stage and finish the process by directly updating the BPF entity instance. In this post, we’ll use RetrieveProcessInstancesRequest and RetrieveActivePathRequest to move a Business Process Flow to its final stage and finish it, using …
Continue reading “Advancing and Finishing a BPF Using RetrieveProcessInstancesRequest and RetrieveActivePathRequest (Dataverse / Dynamics 365)”
Finishing (Deactivating) and Reopening a Business Process Flow Using C# Console App (Dataverse / Dynamics 365) by Nishant Rana
January 13, 2026 In the previous post, we explored how to move a Business Process Flow (BPF) to the next stage using a console application, with the Phone to Case Process as a working example. Advancing the BPF stage, however, is only part of the lifecycle. Even after the flow reaches …
Continue reading “Finishing (Deactivating) and Reopening a Business Process Flow Using C# Console App (Dataverse / Dynamics 365)”
Advancing a Business Process Flow Stage Using a C# Console App (Dataverse / Dynamics 365) by Nishant Rana
January 7, 2026 In Dynamics 365, Business Process Flows are usually progressed by users through the UI. However, in scenarios like data migration, bulk remediation, or backend automation, we may need to move a BPF stage programmatically. Here we will cover one of the ways we can advance the Business Process …
Continue reading “Advancing a Business Process Flow Stage Using a C# Console App (Dataverse / Dynamics 365)”
Using a Plugin to Generate Auto-Number Values for Legacy and Reopened Records in Dynamics 365 / Dataverse by Nishant Rana
January 6, 2026 In one of our recent Dynamics 365 / Dataverse projects, we ran into one issue with auto-number fields. We had configured an auto-number for the custom_id field on the Opportunity table. The format used a prefix of QU- followed by eight digits, resulting in IDs such as QU-00000133. …
Continue reading “Using a Plugin to Generate Auto-Number Values for Legacy and Reopened Records in Dynamics 365 / Dataverse”
Solving CS0006: Metadata File Not Found Error in Visual Studio by Nishant Rana
January 1, 2026 Recently, we encountered a build error in one of our Dynamics 365 projects where Visual Studio was unable to find metadata files for NuGet packages, even though the packages were installed. CSC : error CS0006: Metadata file ‘C:\Users\NishantRana\source\repos\Compass Optimisation\ABC.Xrm.Solution\packages\ABC.Extensions.1.0.3\lib\netstandard2.0\ABC.Extensions.dll’ could not be found On checking the packages folder, …
Continue reading “Solving CS0006: Metadata File Not Found Error in Visual Studio”
[Tool Showcase – PowerMakerAI] Talk to Your CRM Like a Teammate — Meet PowerMakerAI’s Context-Aware Chatbot by Nishant Rana
December 30, 2025 You’ve probably used ChatGPT or Gemini to generate code, write emails, or even debug errors. But what if you could do the same for your Dynamics 365 CRM? No plugins. No clicking around. No SDK calls. Just ask, and your CRM responds — with real data, smart summaries, …
Continue reading “[Tool Showcase – PowerMakerAI] Talk to Your CRM Like a Teammate — Meet PowerMakerAI’s Context-Aware Chatbot”
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”
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”