I have come across various requirements from clients where it was more feasible to go with creating the C# console application for bulk processing the records in D365 CRM based on complex scenarios like updating the closed case entity records or uploading the files to SharePoint at specific location, or any scenarios that needed custom implementation. We also have different approaches to connect to the Dynamics 365 CRM or SharePoint using C# code to perform specific tasks. We can also create the Azure Service App (WebApi) or Window Form Application to perform aforesaid tasks.
Typically, developers connect with the D365 CRM or SharePoint using the Username and Password of the licensed user where these credentials will be stored into the App.Config file of the C# console application. But this approach has below cons that are to be addressed:
To overcome the aforesaid points and in order to choose the appropriate approach, we can make use of the ClientId and ClientSecret instead of the Username and Password. Also, we can make use of Application User that does not require any licences (it’s free).
Follow the below steps to connect to the D365 CRM or SharePoint using C# Code.
Connection to D365 CRM:
Generate ClientId and ClientSecret at Azure:
Create Application User in D365 CRM:
In the next blog here we will take up the task of writing the code to connect using what we have done so far. See you next week.
ATM Inspection PowerApp to ease ATM inspection and report generation process.
Insert data into Many-to-Many relationship in Dynamics CRM very easily & quickly, using the Drag and drop listbox.
Comply your Lead, Contact, and User entities of D365 CRM with GDPR compliance using the GDPR add-on.
Create a personal / system view in Dynamics CRM with all the fields on the form/s which you select for a particular entity using the View Creator.
© All Rights Reserved. Inkey Solutions 2021