About a year ago Jon White’s article concerning a CRM Online Non-Interactive user type was posted on the CRM Team blog. I thought I’d add some additional information I found last week.

But first, a bit of background from Jon’s article:

A non-interactive user is a user account in Microsoft Dynamics CRM Online that can access the system but only via the web service layer. Essentially, that user can not use the user interface. Service accounts are used to access CRM Online using the service to service model. A service account is a non-interactive user account with the proxy role assigned to it. Microsoft Dynamics Online allows 5 free non-interactive user accounts. To make the user account a non-interactive account, you need to change the access mode. The access attribute is not visible in the UI by default.  The attribute is “access modeâ€?, you can either customize the form to show it, or manipulate it by an SDK call.  Setting the access mode to non-interactive simultaneously frees up a license and prevents that identity from logging in interactively.

He goes on to tell you how to add the Access Mode field to the System User Entity form so that this field can be changed by the administrator.

You may also find it useful to put the Access Mode on the Active Users View, so that it displays when you are reviewing your user list:

image

 

Interesting Observation

Last week I was discussing non-interactive users with a colleague when I noticed a rather interesting situation:  If you are out of user licenses for CRM Online you can’t create a non-interactive user through the CRM user interface. Curious, but understandable.

In a nutshell, the New User wizard will inform you that you are out of licenses and not allow you to continue.

You can circumvent the issue by performing these steps:

  1. Temporarily disable a user
  2. Create a new user and change their Access Mode setting to Non-Interactive
  3. Re-enable the user disabled in step 1.

That should do it.

 

Programmatic User Creation

Nothing, however, will stop you from creating a user programmatically.  You just need to supply the proper values.  Here’s some sample code:

systemuser user = new systemuser();

user.accessmode = new Picklist(SystemUserAccessMode.NonInteractive);
user.firstname = "system";
user.lastname = "integration";
user.businessunitid = new Lookup("businessunit", new Guid("{C9694BD7-C0C4-DE11-B95D-02BF0A0679DB}"));

service.Create(user);

As you can see, you only need four properties:

Access Mode

In this case, we’re going to supply NonInteractive as the value, since that is the purpose of our discussion.

First Name

First name of the user.

Last Name

Last name of the user

Business Unit ID

This is the ID of the business unit the user belongs to.

 

Calling the CrmService.Create method to actually create the user.

Afterwards, any connection that you need to make to CRM Online can use the new non-interactive user instead of a fully-licensed person.