Integrating Dynamics 365 with Azure Function using Managed Identity

Wednesday, March 20, 2019

I love Azure Functions. These days, I have to restrain the tendency to solve every problem with this Swiss army knife.  When designing Azure Function integration with Dynamics 365, one of the immediate questions raised is where to store connection strings, credentials and other sensitive details.  The immediate answer is ‘Not in your code’. So where?One option is to store sensitive details in the Application Settings store which is ‘encrypted at rest and transmitted over an encrypted channel.’ While this option is  quite easy to use, it isn’t considered most secured. Another option is using Managed Identity...

Implementing Lead Landing Page with Flow (in 10 min. or less)

Sunday, February 24, 2019

Microsoft Flow, along with Logic Apps, Power Apps and CDS has revolutionized integration with Microsoft Dynamics 365. I have been working with Dynamics products since 2005 and when comparing the resources required back then to hook up a landing page to Dynamics, I estimate that modern solutions require less than 5%. In addition, you don’t have to be an expert developer to implement simple integration scenarios, as declarative mechanisms like Flow and Logic Apps can handle the heavy lifting.     In this post I’ll walkthrough the process of Implementing a Lead Landing Page with Flow while writing the minimum amount...
no comments

Microsoft Graph API – Assign DYN365 License to AAD User

Thursday, December 27, 2018

The automated process of user provisioning becomes common in many projects. Often, the process includes components outside of Dynamics 365 such as  creating a user in Azure Active Directory, assigning plans and licenses and adding user to AAD groups. All of these can be automated using the Microsoft Graph API. In this post, I’ll demonstrate assigning Microsoft Dynamics 365 license to an existing user with Postman. You can later convert Postman requests to JS or C# code or use in Flow and Logic Apps. Prerequisites Have Postman application installed Have access to Office 365 and...
no comments

Auto Backup Dynamics 365 Solution using Flow & Dropbox

Monday, December 24, 2018

Harnessing the scaffold suggested in my last post, I would like to suggest a simple way to automatically backup Dynamics 365 solution with Flow/Logic Apps. The following Flow will allow you to copy Dynamics 365 solution file into Dropbox account on schedule for backup or any other purpose.You can download the scaffold Flow solution here and import into your Flow environment. Then, update the necessary details according to the following walkthrough. The last Dropbox related Action is not included, you’ll add it yourself. Prerequisites Access to Microsoft Dynamics 365 online instance and Flow environment Register...
no comments

Execute a Recurring Job in Microsoft Dynamics 365 with Flow

Sunday, November 11, 2018

I have written about executing recurring jobs in Dynamics 365 few times in the past. Over time, I suggested different scheduling mechanisms such as Microsoft Dynamics Workflow Timeout step or Azure Scheduler, as the pattern I suggested allows changing the scheduling mechanism without impacting other solution parts. Flow can be also used as a scheduling mechanism, one that does not require coding like Azure Function,  as it has a built in integration with Microsoft Dynamics 365 Online. Once invoked on schedule, the executing component query Dynamics 365 for target business records and apply some business logic (Process) to each business record. In...

Custom Code Tracing & Exception Logging in Dynamics 365 v.9

Sunday, October 28, 2018

As a Solution Architect I often review Microsoft Dynamics 365 custom server and client side code. One of the most common rejects regards tracing and exception handling mechanisms, or their absence. Some code constructs may have empty Try/Catch blocks or none at all, other catch exceptions and just re-throw. As for tracing, code often contains debugging ‘aids’ such as alerts and debugger statements or no tracing notifications at all. Why is this a reject? Unhandled raw exceptions float to UI, confusing and frustrating users while exposing internal implementation details to potential attackers System Administrator is unaware of custom code exceptions unless users decide...
no comments

Drag & Drop File Upload Revisited

Thursday, October 18, 2018

Finally found the time for overdue maintenance on the Drag & Drop solution I created two years ago. Why revisit? First of all, as the CodePlex platform, previous home of this solution, is being decommissioned, downloading the component got the whole CodePlex project and few visitors commented that they could not find the actual solution. So now you can download an unmanaged solution from it’s  new home @ Github. Second, I fixed a major bug related to the plural name of some entities. For most entities, appending ‘s’ to the entity schema name would result in the matching entity name for Web API. Some...
no comments

Microsoft Portal – Retrieve Dynamics 365 Data Asynchronously – Part 2

Monday, October 15, 2018

In part 1 of this post I demonstrated building and using a service which receives a FetchXML query and returns Dynamics 365 data to any Portal page in an asynchronous manner as a JSON object. This service is similar to the SDK’s RetrieveMultiple message. In this part 2, I’ll demonstrate a different service, which like the SDK Retrieve message, receives a record type, record id (GUID) and columns set to return the required data as a JSON object. This is useful when you already have a specific Dynamics 365 record id at hand and you want to retrieve additional data for...

Microsoft Portal – Retrieve Dynamics 365 Data Asynchronously – Part 1

Friday, October 12, 2018

Leveraging Colin Vermander brilliant article on using Liquid Templates to return JSON, I would like to demonstrate creating and using a ‘service’ to asynchronously retrieve Dynamics 365 data into any portal page. Why is this useful? Liquid Templates tags are rendered on server side before a response is returned to the browser, so FetchXML tag will return a static result once the page is returned. But what about responding dynamically to client side events such as option selection, button click or expending an element to view more details? Sending the page to the server again is no longer an option if you want...

Big Promise: 2011 SOAP Endpoint Silent Retire

Monday, December 18, 2017

I noticed the following note in the developer guide article. This note embodies big promise for many organizations that are currently planning or actually migrating from version 2011 (and up) to version Dynamics 365, as it removes (or at least dramatically postpones) a big chunk of work required to migrate code that uses the 2011 SOAP endpoint to use Web API endpoint.  In typical enterprise level projects (versions 2011 to Dynamics 365) the 2011 SOAP Endpoint (a.k.a OrganizationService) is heavily used in Plug-ins, Custom Workflow Activity components, external application integration and even client side code. For organization...
one comment