Call Dynamics CRM from Azure Logic App over Web API


In case you need to get or modify data in Dynamics CRM while calling from Azure Logic App I would recommend to use an action of Http type. This action provides you to request Dynamics CRM endpoint using most of relevant verbs (methods), among each other: GET, POST, PATCH, DELETE along with authentication header.
This is mandatory to bind your CRM user prior to consume Dynamics CRM Web API. Please refer to my previous blog where explained how to do it.

Dynamics CRM exposes RESTFul Web API with a plenty of features even fairly complex.
Dynamics CRM Web API implements OData protocol hence you need to consider it while constructing requests.

Below you can find the example how the Azure Logic App can be implemented. It accepts a CityName as an input parameter and is combined in the query sent to Web API resulted with accounts with a city of specified.

Call Dynamics CRM over Web API

Azure Logic App is getting accounts from specified city

and a source code:

Logic App source code

Logic App source code

Please note the authentication is critical and you must provision Azure AD Application along with the binding prior to implementing the Logic App.
To obtain values retrieved by the Http action you need to use a property named 'value' which is an array. Logic App has a variety of string, conversion functions which would help you in parsing retrieved data. Please refer to the link .

Comments (0)

Skip to main content