Sunday, 17 May 2020

Azure Attachment Management & Blob Storage


Configuring Azure Attachment Management and Azure Blob Storage

1.       Download Attachment Manager from Microsoft App Source and install it in your respective Orgs.
2.       Connect to your CRM Instance
3.       Create Azure Storage as shown I pic below:

Once created, open the storage account and scroll down and open the Blobs service. Here, the admin will be able to create the containers that will contain the attachments uploaded via CRM.  Create two global containers (which will be utilised in the Azure Attachment Storage Configuration page) and then create a container for each entity that will map attachments to Azure Blob Storage.
Note: Create two (global) containers named “emailsattachmentcontainer” and “notesattachmentcontainer.” Set the “Public Access Level” of any other containers for their respective entities to “Blob,” as this will enable users to have a preview feature

4.       Now provide access to the users by navigating to Shared Access Signature in Azure portal and create SAS Token by setting Expiry DateTime as shown below :

5.       Now navigate to the Dynamics Azure Attachments and paste SAS token in Configuration window as shown below :

6.       Now enable the Entity for Azure Blob Storage and map Entity in Container window as shown below :

7.       For Email Attachments , map Email entity as shown below :

8.       Provide necessary Access to Users by assigning Security Roles which has Azure Blob Storage Settings, NotesEntityAttachment Settings permissions.


Wednesday, 6 May 2020

Bi-Directional Integration between CRM and other Dot Net Apps


Bi-Directional Integration between CRM and Dot Net App using Azure Components ( No-Code Approach)

Hi All ,

I would like to provide a way to Integrate Dot net App with CRM using Azure Components and no code approach which can be done by leveraging Azure components like MS Flow , Custom Connectors and WebHooks.

Using Custom Connectors :
A custom connector is a wrapper around a REST API (Logic Apps also supports SOAP APIs) that allows Logic Apps, Power Automate, or Power Apps to communicate with that REST or SOAP API. We can define Actions inside Custom Connectors which can be used later in Azure Functions or MS Flows to integrate with other Product ( This is One-Way Integration.)

How to Create Custom Connector & Actions:

You should have Office 365 Admin privileges in order to create a custom connector and you can create custom connector by following steps :
1.     Login in to : https://make.powerapps.com/
2.     Expand Data Icon and look for Custom Connector option as shown below :





3.     You will see below Screen , where you can create Custom Connector either from Stratch or using Open Api file or even using Postman Collection :

4.     If you proceed with PostMan collection , you can create a collection in Post Man by using POST Method and using Endpoint URL of the App which you want to Integrate to and provide Auth Headers and Body as required. In my scenario , I am using API Key in order to authenticate with the Dot Net app which I want to integrate to as shown below :






5.     Once you prepare Post Man Collection , you can use it Custom Connector as Action to perform Desired Action in the Integrated Application as required as shown below :


Also, you can verify Request page to see whether Endpoints , Headers and Body details are correct.

6.     Once Custom Connector is Created , you can use it inside MS Flow as shown below in order to perform necessary actions as Required.




Example : In my example whenever a Lead is created in CRM , I will trigger a MS Flow which in turn uses Custom Connector to create Record in another Application which I want to integrate.


Two – Way Integration :

Consider you want to create a Lead in CRM whenever lead is created in your Organization’s Dot Net Application , the best way to proceed forward is to use WebHooks ( Again – using Azure Http Web Hook component we don’t need to use any Azure Functions or use Custom Workflows to deal with Web Hooks , we can just do some small configurations which help us in receiving data from other app as shown below :

1.     Whenever an Event takes place in Dot Net app , trigger Http Web Api call to Azure Subscribed URI and use Http Web Hook component in Azure in order to receive the Http Request as shown below :


2.     Provide Subscribe URI ( Endpoint of Integrated App ) and Body as shown below :



3.     Once Web Hook is used inside MS Flow , you will receive Context which contains event details as we have passed and attribute data ( like External Identifier) which we can use inside Flow as decision maker in order to either Create\Update the record inside CRM.

Hope this helps. Happy Integrating!