IP ranges for Dynamics 365

IP whitelisting (Range) for Dynamics 365.

In one of our recent project we need to call a web service from Workflow and Action from Dynamics 365 online (9.x) . The web service publisher will allow only request from specific IP ranges due to security principal of the organisation.

To Achieve this IP range there could be multiple approach but I will explain the below two

  1. Add Dynamics IP range to the allowed IP range for the Web Service Publisher.
  2. Use Azure API manager or some other static IP provider in between Dynamics 365 and the Web service.

In the current blog I will explain the Dynamics 365 IP ranges. I will explain the Azure API manager in future blog.

Add Dynamics IP range to the allowed IP range for the webservice

The IP range for dynamics CRM can be found on https://support.microsoft.com/en-us/help/2728473/microsoft-dynamics-crm-online-ip-address-ranges . this link has the exhaustive list for Dynamics CRM for each CRM region. For Oceania region the list is around 10 IP ranges.

But I found that the Request to the web service is going from 13.70.86.61 which is not listed in the in the IP range for Oceania for CRM, but this is within a range Azure IP range for Oceania region.

So, I understood with 9.x version as dynamics is using Azure infrastructure so request is going from Azure IP range. Up to CRM 8.x version the request seems to go from Dynamics IP range(Listed previously) . To get double sure I raised a ticket with Microsoft.

Based on the reply from Microsoft, Dynamics 365 does not have any static IP range furthermore with 9.x and higher as the Azure infra has been used. The IP that the request will go from Azure IP range for this region.

The Azure IP range all region can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=41653

Below is the reply from Microsoft for the ticket.

Ip Range

Conclusion

So, If you have the requirement for IP range from currently use all the Azure IP range for the region. This is not a clean solution as this IP range could be changed by Microsoft anytime. So, Using API manager and wrapper service will be a cleaner solution but this include extra cost for customer in terms of development and Azure hosting.

I wish Microsoft will come with a more specific IP ranges for Dynamics Application.

I will explain the API manager and Wrapper service approach in future blog.

 

Advertisements

At this time Microsoft Dynamics 365 requires version 4.6.2 of the .NET Framework for plugin assemblies.

Today I tried to import a solution from Dev environment to QA and I found Solution import failed. The error is “At this time Microsoft Dynamics 365 requires version 4.6.2 of the .NET Framework for plugin assemblies. Rebuild this assembly using .NET Framework version 4.6.2 and try again.”

Over Checking the assembly, I found that my Plug-in assembly is in .NET framework version 4.6.2. So, the error is a bit misleading. I am working in this project for three months and  .NET framework version we are using is always 4.6.2. This issue is happening only after 10th may 2018 before this it use to work fine.

Resolution

I have downgraded the .NET framework to 4.5.2 only for Plug in and rebuilt the solution and upgraded the assembly in Dev Environment. After that I exported and imported the solution from Dev to QA. This time it worked without any issue.

Root cause of this issue could be some inconsistency in patch deployment in Dynamics instance. The error seems to be misleading also.

Conclusion

So, until we get new version we need to keep on using .NET framework version 4.5.2 for plug in and workflow development in Dynamics 365(v 9.x).

Dynamics Key failed during Solution import and does not throw any error

Dynamics Key failed during Solution import without any error

In my recent project I found an issue when I was importing the solution from Dev to QA. The solution import was successful and there was no error. But, I found that keys of the solution is on Pending state as shown below

Image1

In this system keys in the system will not work . I tried to reactivate the keys and got the below error. I have re imported the Solution but  and published the solution, but the issue persist. When the issue persist

Image2

Iamge3

When I click on the “Create Index ”, it shows me the failed job

Iamge4

Resolution

Following are the steps for resolving the issue

Go to Setting -> Systems -> System Jobs. Filter the jobs based on “Failed” State.  I found that lots of system job is in failed state as shown below.

Iamge 5

Select all the jobs and “Delete” them.

After deletion is completed, Go to the entity inside the solution  and to the key where it failed. Click on the “Reactivate Key” as shown below

Image 6

This Time key generation was successful and the status of the key is Active as shown below and system works as expected.

Iamge 7