Provide the appropriate details. (Here we have selected the – Developer tier)
After validation is passed, review and click on Create.
It will take around 30 minutes for the deployment to be finished
After the deployment is successful, we can navigate to it and can find the Gateway URL and Developer portal URL as shown below.
Here we will start with a Blank API.
Specify the display name, name and for Web service URL the URL of Dynamics 365 Web API
Click on +Add operation to add a new operation to the API.
Specify the URL as shown below to fetch all the contacts from Dynamics 365.
The URL of the operation
Right now we will get the 401 error as expected as we have not passed the token expected by the Web API.
Now for the token part for calling the Dynamics 365 API, register the Application in Azure AD, create a new Application User, and assign appropriate security roles to it.
Here we would be defining send-request policy, to generate the Token and pass it in the Authorization header to the Dynamis 365 Web API request.
Select the GET operation, navigate to the Design tab and open the policy code editor for inbound processing
Add the send-request and set-header policy to generate and set the bearerToken
Specify the endpoint URL of OAuth token, client id, client secret of the application registered.
"copy code from the end of the post"
Save the change and let us test the API.
We can see the results as expected.
The other things that can be done are to associate the API with Products, specify Subscription, Security, enable Application Insights, Azure Monitor etc.
Originally posted on Ricky Safford Development Repository: Please remember to reschedule these maintenance jobs after the installation of CRM is completed. Maintenance Job…
Originally posted on Matthew Webb's Dynamics 365 Blog: Recap Best Practices: Part 2 Welcome back! My previous blog discussed the use of Staging Databases as…
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.
Originally posted on CRM & Coffee: Hello team, This week I have been working with Certificates a LOT, and let me tell you, it’s a world on its own, I always had a lot of respect for the people that work on that field, now my respect is…
Originally posted on Power Platform: When an new Environment is created, it takes more than an hour or some times a day to sync users from Azure AD to CRM. Through Power Shell cmdlets, we can sync user immediately. Install Module Microsoft.PowerApps.Administration.PowerShell Install-Module -Name Microsoft.PowerApps.Administration.PowerShell Connect to Power…
Originally posted on Ricky Safford Development Repository: Please remember to reschedule these maintenance jobs after the installation of CRM is completed. Maintenance Job Name Purpose Default Frequency/ Recommendation Deletion Service The deletion service maintenance operation now cleans up subscription tracking records for deleted metadata objects as they expire.…
Azure API Management is an Azure service to create consistent API gateways for secure, scalable access for back-end applications and services. Azure API Management consists of 3 main components API Gateway Azure Portal for administration Developer Portal for API documentation Each API inside Azure API Management contains a … Continue reading “Manage Dynamics 365 Web API with Azure API Management”
Custom API (preview) allows us to define our custom messages that can be called from web services, similar to Custom Actions. Usually, we would be creating custom workflow actions just to create a new message, to which we can hook our plugin, without defining any logic in the … Continue reading “Use Custom API to create custom messages in Dynamics 365”
Custom API (preview) allows us to define our custom messages that can be called from web services, similar to Custom Actions. Usually, we would be creating custom workflow actions just to create a new message, to which we can hook our plugin, without defining any logic in the workflow. For this scenario or pattern now we can use Custom API instead.
There are different ways of creating a custom API.
Through the Maker Portal.
Using Web API or Organization Service.
Editing the solution files.
The 3 key entities involved here are
CustomAPI
CustomAPIRequestParameter
CustomAPIResponseProperty
Let us try creating a CustomAPI through the maker portal.
Create a new solution, and click on New and select Custom API
Let us start with a very basic custom action.
Unique Name
This will be the name of the message. Should have the prefix same as solution’s publisher.
Name
The name of the Custom API will show up inside the solution
Display Name
Localized display name of the Custom API
Description
Localized description of the Custom API
Binding Type
Value: 0 Label: Global
Value: 1 Label: Entity
Value: 2 Label: EntityCollection
Bound Entity Logical Name
Logical name of the entity in case of binding type – Entity and EntityCollection.
Is Function
Value: 0 Label: No
Value: 1 Label: Yes
Allowed Custom Processing Step Type
Value: 0 Label: None Meaning: No custom processing steps allowed.
Value: 1 Label: Async Only Meaning: Only asynchronous custom processing steps allowed
Value: 2 Label: Sync and Async Meaning: No restriction. 3rd party plug-ins can add synchronous logic to change the behavior of the message
Execute Privilege Name
Name of the Privilege that is required for the execution of the Custom API.
Plugin Type
Reference of the plugin registered for the Custom API
So right now we have a very basic custom API registered of Global type, which doesn’t allow any steps to be registered and doesn’t need any privileges to execute
Let us write a sample plugin and associate with this new message.
Let us register the assembly
Now let us go back to our Custom API record and associate the Plugin registered.
Let us trigger the plugin by calling the Custom API through the Postman.
Let us check the plugin trace log inside Dynamics 365 App.
Originally posted on CRM & Coffee: Hello team, This week I have been working with Certificates a LOT, and let me tell you, it’s a world on its own, I always had a lot…
Originally posted on Power Platform: When an new Environment is created, it takes more than an hour or some times a day to sync users from Azure AD to CRM. Through Power Shell cmdlets,…
Originally posted on Ricky Safford Development Repository: Please remember to reschedule these maintenance jobs after the installation of CRM is completed. Maintenance Job Name Purpose Default Frequency/ Recommendation Deletion Service The deletion service maintenance…
Azure API Management is an Azure service to create consistent API gateways for secure, scalable access for back-end applications and services. Azure API Management consists of 3 main components API Gateway Azure Portal for … Continue reading “Manage Dynamics 365 Web API with Azure API Management”
Originally posted on Phani Rajasekhar: In my previous blog I explained the issues that I faced while POA entity migration. Here I will explain the whole process that I followed to migrate the personal…
Navigate to Settings -> Features and turn on the Relevance Search
This places the search bar in the header, making it easy to access while navigating across different pages.
With Relevance search turned off à
On clicking the search icon à we are navigated to the categorized search page.
The search result for the term “alex” with Relevance Search on–
Even before we can enter our query in the search box, the search box displays the recent terms (seems like max 3) used for search along with recent records (seems like max 6) accessed.
Provides increment search or real-time suggestions while we are tying the search term
Originally posted on CRM & Coffee: Hello team, This week I have been working with Certificates a LOT, and let me tell you, it’s a world on its own, I always had a lot…
Originally posted on Power Platform: When an new Environment is created, it takes more than an hour or some times a day to sync users from Azure AD to CRM. Through Power Shell cmdlets,…
Originally posted on Ricky Safford Development Repository: Please remember to reschedule these maintenance jobs after the installation of CRM is completed. Maintenance Job Name Purpose Default Frequency/ Recommendation Deletion Service The deletion service maintenance…
Azure API Management is an Azure service to create consistent API gateways for secure, scalable access for back-end applications and services. Azure API Management consists of 3 main components API Gateway Azure Portal for … Continue reading “Manage Dynamics 365 Web API with Azure API Management”
Originally posted on Phani Rajasekhar: In my previous blog I explained the issues that I faced while POA entity migration. Here I will explain the whole process that I followed to migrate the personal…
Use CrmServiceClient to execute web request against Dynamics 365 Web API – OAuth Consume Dynamics 365 Web API using MSAL.NET using ConfidentialClientApplicationBuilder class the connection string parameters Consume Dynamics 365 Web API – OAuth … Continue reading “Sample Code – Dynamics 365 Web API / Organization Service”
In my previous blog I explained the issues that I faced while POA entity migration. Here I will explain the whole process that I followed to migrate the personal views with sharing information. I used kingsway soft adapter for my migration process.
We have 2 steps to migrate the data
Source CRM –> Intermediate database.
I enabled “Data Export Services” on the source instance to push the data into intermediate database.
Since “userquery” entity is not available in “Data Export Services”, I Designed a simple SSIS Package with source (Dynamics CRM) and destination (OLE DB) components.
We have to impersonate the owner of the personal view in the Dynamics CRM Source component to read this information.
So we have to run this package multiple times based on the user count.
Intermediate database –> Target CRM
Designed 2 more SSIS Packages to push “userquery” and “principalobjectaccess” (share) information to Target CRM…
The new Dynamics 365 Sales mobile app (preview), has been introduced specifically for the field sellers who need quick access and intuitive management of the customer information … Continue reading “Dynamics 365 Sales mobile app (preview)”
Originally posted on Ajit Patra: Recently, we were working on connecting to CE to do some CRUD operation using Azure function. We were using Client ID(Application ID)…
Originally posted on Matthew Webb's Dynamics 365 Blog: Recap Best Practices: Part 2 Welcome back! My previous blog discussed the use of Staging Databases as part of integration…
Sharing a sample code to consume Dynamics 365 Web API using MSAL.NET Create a console application and add the following NuGet Package Microsoft.Identity.Client More on Microsoft identity … Continue reading “Consume Dynamics 365 Web API using MSAL.NET”
Originally posted on Vrushali's Techno Blog: Recently I worked on a project where not a single line of code was allowed. It was only configuration project.…