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..
Turn on failed or You need a Microsoft Dynamics 365 license to continue error while trying to Activate a Workflow – Dynamics 365 / Dataverse by Nishant Rana
May 15, 2024 Recently while trying to Activate a Workflow we got the below error – Turn on failed. The user with SystemUserId=f02934fa-483e-eb11-bf70-000d3a795b83 in OrganizationContext=37c5705b-a88f-4f40-b654-7bab4d5c1f95 is not licensed. Please contact your system administrator to add license to this user for the action to succeed. SystemUserAccessMode=0 is not either of (NonInteractive=4, SetupUser=1). …
Continue reading “Turn on failed or You need a Microsoft Dynamics 365 license to continue error while trying to Activate a Workflow – Dynamics 365 / Dataverse”
Flow Error – It hasn’t been triggered successfully in the last 28 days (Power Automate / Dataverse) by Nishant Rana
May 14, 2024 For one of our flows while testing we realized it was not getting triggered. We could see it giving below error – There’s a problem that needs to be fixed to trigger this flow – It hasn’t been triggered successfully in the last 28 days. We tried a …
Continue reading “Flow Error – It hasn’t been triggered successfully in the last 28 days (Power Automate / Dataverse)”
Use Filter Array action to remove values from an array variable – Power Automate by Nishant Rana
May 8, 2024 Suppose we have below array variable – varTestVariable having a list of GUIDs in it. And we have another array variable varWorkOrderGuidToBeRemoved which has the list of GUIDs we want to remove from our first variable varTestVariable For this, we can make use of the Filter array action …
Continue reading “Use Filter Array action to remove values from an array variable – Power Automate”
Fixed – The latitude or longitude for the User record associated with this resource is invalid – Dynamics 365 Field Service /Dataverse by Nishant Rana
May 7, 2024 While trying to set the Start Location / End location to the Resource Address for Bookable Resource, we might get the below error Exception Message: The latitude or longitude for the User record associated with this resource is invalid. Please provide a valid latitude and longitude and then …
Continue reading “Fixed – The latitude or longitude for the User record associated with this resource is invalid – Dynamics 365 Field Service /Dataverse”
Use Geolocation Settings for Location Tracking and Auditing – Dynamics 365 Field Service by Nishant Rana
May 1, 2024 We can track the different locations Field Service technicians have traveled or where they are at a given time inside Dynamics 365 Field Service. Field Service Technicians can enable location sharing from the app, and based on the Geolocation Settings configured, we can see the technician’s location in …
Continue reading “Use Geolocation Settings for Location Tracking and Auditing – Dynamics 365 Field Service”
Fix the trigger – Microsoft.OData.ODataException: A binary operator with incompatible types was detected. Found operand types ‘Edm.Guid’ and ‘Edm.String’ for operator kind ‘Equal’ (Power Automate / Dataverse) by Nishant Rana
April 30, 2024 Recently in one of our flow triggers – When a row is modified (Dataverse), we got the below error Exception parsing _msdyn_billingaccount_value eq ‘a84c5028-ecdf-ed11-a7c7-00224893b2b0’ submitted for attribute filterexpression of callback registration. Target entity: msdyn_workorder. Exception: Microsoft.OData.ODataException: A binary operator with incompatible types was detected. Found operand types ‘Edm.Guid’ …
Continue reading “Fix the trigger – Microsoft.OData.ODataException: A binary operator with incompatible types was detected. Found operand types ‘Edm.Guid’ and ‘Edm.String’ for operator kind ‘Equal’ (Power Automate / Dataverse)”
Portal does not load and displays “Server Error” or shows “Getting set up.. This might take a while” message -Portal Startup Issue (PowerApps Portal) by Nishant Rana
April 24, 2024 While trying to create a Website with Template – Partner Portal, we observed the provisioning stuck at – Getting set up… Also, it was showing the below error on checking the Site Health. “URL of the Dynamics 365 organization connected to this portal has been changed.” Which wasn’t …
Continue reading “Portal does not load and displays “Server Error” or shows “Getting set up.. This might take a while” message -Portal Startup Issue (PowerApps Portal)”
Versioning and Drafts for Solution-based Cloud Flows – Power Automate by Nishant Rana
April 23, 2024 We now have the version support for Cloud Flows in Power Automate. This feature is only available in the new editor. Let us start by creating a simple flow, the creation part will happen in the existing editor. Let us save the flow, and select Edit >> Details …
Continue reading “Versioning and Drafts for Solution-based Cloud Flows – Power Automate”
What will happen on changing the password of the user account used as the Owner of Cloud Flow and for Connection – Power Automate by Nishant Rana
April 17, 2024 Recently we had to change the password of the user account being used as an owner of the cloud flows as well as the used for connection/connection reference. So we tried it on a trial environment first, below is our flow that runs every 5 minutes and creates …
Continue reading “What will happen on changing the password of the user account used as the Owner of Cloud Flow and for Connection – Power Automate”
Using Focused view in Dynamics 365 by Nishant Rana
April 16, 2024 Focused view in Dynamics 365 that allows users to view and manage all their records in one place, allowing them to be more productive, as they can stay on track and avoid getting sidetracked by switching between multiple screens to find the information they need. We can enable …
Continue reading “Using Focused view in Dynamics 365”
4 thoughts on “Execute Privilege Name (ExecutePrivilegeName) property of Custom API in Dynamics 365 / Microsoft Dataverse”