söndag 27 november 2016

Data Encryption Keys during upgrade from CRM 2013

I've been doing some upgrades from CRM 2013 the past couple of month and one thing I've run into is the encryption keys.

The funny thing is that an encryption key that is valid in CRM 2013 isn't valid in CRM 2015 and later. It seems that Microsoft has changed the requirement of the encryption key sometime after the lauch of CRM 2013. So what are the requirements of the encryption key. I started looking for it and it isn't all that clear, however  this blog: http://blog.cobalt.net/blog/microsoft-crm-data-encryption-key-%E2%80%93-one-time-you-can-just-make-sh-up say the following:  "The value you enter should be between 10 and 100 characters in length, have at least one numeral, at least one letter and one symbol or special character."

That sounds like a sound idea and the question is if the "at least one symbol or special character" is what have changed. When I use an encryption key which follows this rule set it works and the key that was used on the CRM 2013 which didn't work in later versions didn't have a special character, it did however contain an upper case letter, a lower case letter, a digit and was more than 10 characters long. 
After upgrade you need to re-enter the encryption key from the previous version again and if that key doesn't match you can't save and if the key doesn't match the above criteria you can't save either so you need to go back to the CRM 2013, change the key to something that will be accepted in the more modern version and then to the entire upgrade process again.

Hope this helps someone.

Rickard Norström
Developer at CRM-Konsulterna

SQL Error when importing an organization

I had a very weird moment the other day when I was trying to rename an organization in CRM. All of a sudden I got an error saying SQL server is unavailable.

The funny thing is that I opened the deployment manager and disabled and deleted the organization without any issues whatsoever. When I was going to re-import it it all seemed smooth as always, I got to choose the database server and which organization I wanted to import, then I got to name it, which was what I wanted to change, and the reporting server URL plus user mapping passed after that.

Here's where things went south. The always dreaded checks and this time it broke down on me on the SQL server check saying that the SQL server was unavailable, no path could be found.

I obviously found this very annoying and also sort of strange since I set up the server a couple of days ago and all of a sudden it couldn't talk to the SQL, which it obviously had been talking to a couple of seconds earlier since I'm HOPING that the deployment manager doesn't just guess about things like orgnaization names and stuff like that.

On the SQL server there were no error messages so it didn't look like an SQL error, all the services was up and running, but I restarted a couple of them just to be sure. When I tried to import the organization again I ran a "netstat -n" on the CRM server and it tried to do something over port 445, which is part of the ports that are needed for AD authentication according to the IG, it is sort of weird that it got blocked or if it has always been blocked weitd that it has been working.

The solution was to open port 445 on the SQL server and then the checks went through fine and I could import the organization with a new name.

Rickard Norström
Developer at CRM-Konsulterna

onsdag 23 november 2016

Using Powershell to set up a new organisation

Being the primary techie goblin in our company it often is my job to set up new organisations for development or testing purposes so I thought it might be a neat thing to do this by powershell, which it really should be...

It would actually seem that Microsoft agrees with me since it exists a cmdlet in Microsoft.Crm.Powershell that's called New-Crm-Organization, which you can  read about here.
The issue I was faced with is that it seems that the cmdlet in powershell is run by the service account of the deployment web service.
On the first server I tried this, which is a very test-no-production-server that account was Network Service, and the new org-cmdlet failed with a whole bunch of errors looking like this:

Error Items:
    ActiveDirectoryRightsCheck raising error : The current user does not have required permissions (read/write) for the following Active Directory group: CN=ReportingGro
up {a189b908-ee74-4532-b70d-373aea8fb39f},OU=CRM2016DEV,OU=CRMS,DC=effa,DC=local
    SysAdminCheck raising error : You do not have sufficient permission to perform this operation on the specified organization database
    ExistingRSCheck raising error : Setup failed to validate specified Reporting Services Report Server http://crm2016dev/reportserver. Error: Error occurred while findi
ng an item on the report server.
System.Web.Services.Protocols.SoapException: The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this operation. ---> Microsof
t.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this oper

This made me a bit sad since I wanted to use Powershell, the strange thing is that it works to create organisations with the deployment management tool, it didn't matter if I used the -Credential-flag either, it still used Network Service.
Oh well, I thought, maybe I'm having better luck on another server where I have an AD account set up as the deployment web service account, but I ran into the same issue there.
I've found sites on the web where they say that you can give the appopriate rights in the OU, which probably means that you need to give access to the reporting services too and so on and so on. I will be continuing to search for solutions of this issue since it would be oh so neat to handle this kind of operations with Powershell. If anyone has a good solution, give me a holler.

Rickard Norström
Developer at CRM-Konsulterna

onsdag 16 november 2016

Install CRM 2015 without an internet connection

I was recently faced with the task to install a CRM 2015 without any internet connection which seems like a thing that’s not that uncommon. There are enough companies out there that don’t want their servers to touch internet. There is however no guide in the Implementation guide as far as I could find, and I didn’t find any guides on that same internet so I thought I would put a short one together if I need it in the future. Maybe someone else can use it too in an upgrade situation, which is what I’m doing.

First issue is that the C++ redist didn’t install. This issue was resolved using the ever knowing CRM community at https://community.dynamics.com/crm/f/117/. Where I found this post https://community.dynamics.com/crm/f/117/t/148286.
Easy solution, download the file from http://go.microsoft.com/fwlink/?LinkId=402059&clcid=0x409 and place it in a folder called VCRedist in the folder where you expand the CRM installation files, in my case c:\tmp\crmunp\vcredist. I installed the redist, but I still needed to have the file in that folder.

Now next issue and that is the things that CRM wants to download and install:
SQL Native client
SQL System Clr Types
SQL Server Management Objects
Microsoft SQL Reporting Service Report Viewer Control

You might wonder, what happened to the Microsoft Application Error Reporting tool. The answer is that it’s included in the installation file, I have no idea why the four other aren’t but that’s the case. If you have a peek in the log after your first fail you will see the download paths. These are the ones as of 2016-11-14:


Download those and copy them to the server you want to install CRM 2015 on and install them, after that everything should be fine and dandy.
Next issue I ran into is that you also need to copy the VCRedist folder you just created in the expanded files root to the SRS Connector installer directory, well, or to the SQL server where you copied the SRS installer directory

For CRM 2016 you will need to place the C++ Redist in a folder as described above and another folder called VCRedist10

Why on earth am I installing a CRM 2015 you might wonder and the answer is "for upgrading purposes" :)

Rickard Norström
Developer at CRM-Konsulterna

onsdag 2 november 2016

Getting Dynamics 365 trial in an Office 365 E3 trial up and running

Dynamics 365 is out, as you might have noticed. My colleague Gustaf has made a quick blog about the editable grids which you can find here

This article is slightly related since there was a challenge at the office that you didn’t want to be the last one setting up a Dynamics 365 trial. I was sure to be the last one since I had some reporting jobs to be done but found a bit of time to set one up. 

I went for my “regular” Office 365 E3 trial to get everything else in place if it was needed which can be found here. When everything was ready, I logged in as usual and went to the admin center.

…And subscriptions

….Where I chose the Dynamics 365 Plan 1, Enterprise Edition. This seems to be the only one available at the moment, so we can’t see what the smaller version holds just yet.

Anyway, after this I went back to the admin center, went to the active users, selected my user, chose “Edit” on product licenses 

Added the Dynamics 365 license and hoped for the best.

When I clicked on the Dynamics 365 tile on the Office 365 page this is what greeted me.

Not what I hoped for. Some desperate clicking later I found, by accident pretty much, that there’s a Dynamics 365 page under Admin Centers on the Admin Center page

Clicking that link, I got to choose how my CRM-part of Dynamics 365 would be set up as it used to be in Dynamics CRM 2016.

Now I will click away in the new version and see what has happened. I thought I’d share this if someone else got into the same problem. This is actually also a short guide of how to set up your Office 365 E3 trial with a Dynamics 365 connected which is the way to do it as far as I am concerned considering that you get a Sharepoint if you need to set up a integration between Dynamics 365 and Sharepoint of Office 365.

Rickard Norström
Developer at CRM-Konsulterna