v9 GA and some problems with Solution deployment

v9 GA and some problems with Solution deployment

As many of you probably have noticed version 9.0 has just been released. If you havn’t, spin up a trial by clicking here: New Trial

It has a very nice and shiny UI which I really think you should try and some very other very nice new features. However, you should be a bit wary of using it in production environments just yet as there seems to be a bit too many serious bugs as described in this document:

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/readme-9

I am working with a customer and we have a specific non-production instance we call “sandbox” which we use to test apps and features outside of the ALM (application lifecycle management) process, so we installed v9 or July Update as it is called and tried it out.

What I found when trying to deploy our unmanaged customization with all the entities which we have changed in the project, was that I got the weirdest error, it complained that it was missing an internal Microsoft Web Resource with the name of:
  “CampaignActivity_main_system_library.js”

So, I opened up the customization.xml (yes, all you oldtimers from CRM 3.0 time remember it as the true export file) and searched for the guid and the web resource name in the file. I found that it was actually used on the main form of Compaign Activitiy, and if you look at the read-me document I have linked above, it mentions that the Campaign Activity is one of the entities which does not work. Hence, there is probably some old code in there that Microsoft have decided to remove, and havn’t had time to replace.

So, the temporary fix to get our solution to work in Dynamics 365 v9.0 (July Release), go into the customization.xml and then manually remove all <Event> tags which include that webresource, and if the <Events> tag was empty, remove that too. Then put the customization.xml file back into the solution file and reimport it.

The campaign activity still won’t work but at least our solution imported. Perhaps there are similar issues with other entities.

I will expect this issue to go away very soon.

And on the issue of if it is ok and supported to manually edit (hack) the customization.xml file I am under the impression that it is as long as it actually import into a system without any forceful shoehorning as it is up to Dyn365 to validate it.

On monday, I will be heading to CRM UG Summit in Nashville which is sure to be a great trip. I am planning to try to make some video there which I will post here and on my Youtube, and don’t miss my session on if it is really is a fair fight to compare Online with Onprem? Guess what I will say?

Gustaf Westerlund
MVP, Founder and Principal Consultant at CRM-konsulterna AB
www.crmkonsulterna.se

AuthenticationResult.AcquireToken deprecated in ADAL 3.x and how to fix.

AuthenticationResult.AcquireToken deprecated in ADAL 3.x and how to fix.

When authenticating to Dyn 365 with S2S the following is a simple program using the S2S authentication which core I think I got originally got from my pal George Doubinski. I like to use it to test S2S. Very clean and easy to build on.

string organizationUrl = “<org url>”;string clientId = “<client id in Azure>”;string appKey = “<secret for the clientid>”;string aadInstance = “https://login.microsoftonline.com/”;string tenantID = “<contoso or whateveryouhave>.onmicrosoft.com”;

ClientCredential clientcred = new ClientCredential(clientId, appKey);AuthenticationContext authenticationContext = new AuthenticationContext(aadInstance + tenantID);AuthenticationResult authenticationResult = authenticationContext.AcquireToken(organizationUrl, clientcred);var requestedToken = authenticationResult.AccessToken;

using (OrganizationWebProxyClient sdkService = new OrganizationWebProxyClient(GetServiceUrl(organizationUrl), false)){sdkService.HeaderToken = requestedToken;OrganizationRequest request = new OrganizationRequest();
WhoAmIResponse response = sdkService.Execute(new WhoAmIRequest()) as WhoAmIResponse;

Console.WriteLine($”UserID:{response.UserId}”);Console.WriteLine(“Press any key to continue…”);Console.ReadKey();

}

However, the line:
AuthenticationResult authenticationResult = authenticationContext.AcquireToken(organizationUrl, clientcred);

Cloud computing – isn’t it great?

Requires ADAL version 2.x and the method AquireToken has been removed in the later version of that library.

If you look around the net, many advocate staying on 2.x version of the library but I didn’t have that option as I was integrating with Dyn 365 Operations and that was using the ver 3.x.

So, to make this work in version 3.x you just have to make a simple fix:

AuthenticationResult authenticationResult = authenticationContext.AcquireTokenAsync(ClientConfig.CRMOrgUrl, clientcred).Result;


Gustaf Westerlund
MVP, Founder and CTO at CRM-konsulterna AB
www.crmkonsulterna.se

What do you need to have a Voice?

What do you need to have a Voice?

Have been trying to install Voice of the customer for one of my customers. As with larger customers,
and of course, many of the smaller ones too, I am not allowed to (and I don’t really want to) be the global admin in their Office 365. I am however a Dynamics 365 Service Admin, which I think is fair.

So I was trying to provision Voice of the Customer (VoC) but it failed and after many weird loops and dances with support, of which I will not mention here, I finally got hold of Microsoft support and they were able to tell me that not only did I need to get hold of one of the global admins (you know, one of the scary pale guys who they lock in a safe somewhere cause god knows what would happen if they stepped in front of a car…) but the user also needs to have a full plan 1 Dynamics 365 license.

Said and done, we allocated it, and restarted the installation – do remember that you have to install VoC from the “Applications” tab, and not only as a Solution.

So, quick recap:
To install VoC, you need:
– Dynamics 365 online instance
– User with Dynamics 365 Plan 1 license
– Same user with Global Admin rights

Gustaf Westerlund
MVP, Founder and CTO at CRM-konsulterna AB
www.crmkonsulterna.se