User Security Manager – My first XrmToolBox Plugin

Being one of the biggest fan and the most frequent daily user of XrmToolBox, always had this wish to write a plugin for it.

Thanks to Prashant Maurya  (a dear friend and ex-Microsoft Employee) for making this wish come true. (Who played the major role in developing it).

The tool is called – User Security Manager.

The Plugin make it easy for the administrators to manage all the security related aspects of the system users. The tool also gives 360-degree information of the user in correspondence to business unit, security roles and teams.

In our current project we had around 180 users using the system divided into more than 50 business units, which involved frequent update of their business unit, changes in the security roles assigned, update in team assignment and also during testing we had to assign the same BU and roles to the test users in the org, which wasn’t that easy to do from the user interface.

So, the idea was to come up with a tool that will let an administrator to

  • View all the security roles that assigned to the user either directly or through the team that the user is member of.
  • View all the Teams the selected user is part of.
  • With just a single click, remove all the security roles assigned to the user.
  • With just a single click, remove user from all the teams that he is part of.
  • Easily assign and unassign single or multiple security role to the user.
  • Easily add or remove user from a single or multiple team.
  • Change the Business Unit of the user.

User Guide: –

Load all the users

After connecting to the organization, we can click on Load Users to load all the system users of the organization.

List details of the user selected

  • For the selected user, in User Detail Tab’s General section, we can get the general information of the user like First Name, Last Name, Title, Primary Email and Access Mode.
  • Next to the General section, we can see all the security roles assigned to the user either directly or through the teams the user is member of.
  • The Roles tab shows all the Roles assigned to the user and also the roles that are available in the business unit to which user belongs in Assigned and Available section along with their counts.
  • The Teams tab shows all the teams user is member of and also the teams that are available in the organization in Assigned and Available section along with their counts.

Remove all security roles of the user.

To remove all the security roles of the user, click on Remove All Roles button.

Remove user from all teams.

To remove the user from all the teams, click on Remove All Teams button.

Assign Security role to the user.

To assign security role to the user, check the security roles from the available security roles section and click on “<<” button.

To remove security role from the user.

To remove security roles from the user, select the roles from the Assigned section and click on “>>” button.

Assign User to Team(s).

To assign user to team(s), select the teams from the available section and click on “<<” button.

Remove user from Team(s)

To remove user from Team(s), select the team from the Assigned Section and click on “>>” button.

Change the business unit of the user.

To change the business unit of the user, select the Business Unit from the Business Unit drop down in General Section of User Details.

Please install it, use it and share your feedback which would help us to improve it

https://www.xrmtoolbox.com/releases/

Hope it helps..


	

PLAN PROPERLY before using Back and restore and Copy instances in Dynamics 365

Update – 25 June 2018 – Took nearly 20 days to get both the instances up.

Update – 12 June 2018Support Engineer has been not been able to resolve either of the support ticket which were raised last Thursday 7th June. One instance is not opening and the other instance is not restored with the backup we had requested. They are unable to find the backup till now.

Recently we tried copying our DEV to one of the TEST instances. The idea was we were upgrading the click dimensions solution in our DEV so we wanted to make sure everything works fine after the upgrade and in case it didn’t we could then again copy it back from the TEST.

We had faced back and restore issues (instance failed) in the past so decided to go the Copy instance way this time.

However, we got the Instance Failed error on the TEST instance to which we were copying DEV to.

Interestingly the Edit, Reset, Delete etc option were still available and we could open the TEST instance (the original, as the copy of DEV had failed) without any issues.

Then we thought of giving a try again and started copy from DEV to TEST again. This time again it failed. And with no option of Edit, Reset, delete etc. and the Instance was also not opening.

The error à

Along with that we also tried Restoring the Backup in one of the other TEST instances, that also expectedly failed.

So basically, we ended up with 2 unusable instances.

A few weeks back also we faced the same with our Dev environment and the only way out was to raise the support ticket with Microsoft. That time it took 5 days for DEV to be restored. Imagine the development activity that came to halt.

Last year also we had faced this issue in Production and had to work with the support team for 16 – 20 hours continuously to get it restored.

So, if we have some critical activity planned like Production Deployment and we are counting on Back and Restore or Copy an instance to rescue us in case anything goes wrong after production deployment, we need to plan for this Instance Failure as well while restoring or copying.

Basically, be ready to raise a support ticket with the highest severity to restore things back, which could take hours or in worst case days and do all the production deployment over the weekend or have enough downtime allocated.

Hope it helps..

Insufficient Permissions error while updating records using Excel Online in Dynamics 365

Recently one of our users reported the below while trying to bulk update the records using Excel Online feature.

The user had the Update rights for those records.

Basically, the Excel Online update features creates a data import job in the background.

https://debajmecrm.com/2015/11/14/dynamics-crm-excel-online-field-changes-save/

So the user had to be given the import data rights.

We resolved the issue by giving the following rights to the user at organization level.

  • Data Import
  • Data Map
  • Import Source File
  • Web Wizard
  • Web Wizard Access Privilege
  • Wizard Page

https://community.dynamics.com/crm/b/crmpowerobjects/archive/2015/08/18/data-import-privileges

Hope it helps..

The unit schedule id is missing error while trying to migrating product in Dynamics 365

Recently while trying import products from our Dev to Test environment using the Configuration Migration tool we got the below error

The reason being we were using default unit as a unit group in out DEV and the same wasn’t there in the TEST environment. Interestingly if we set the correct GUID in the data.xml generated by Configuration Migration tool and try importing, still the products do not get imported.

So basically, if we try importing the products entity alone we might run into issues. To migrate it properly we need to add the related entities along with it as mentioned in the Microsoft documentation.

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/manage-product-catalog-configuration

We created a new schema file with Product and its related entities, and this time migration worked properly.

Hope this helps.

“Cannot delete an active workflow definition” error while importing solution in Dynamics 365

Recently while trying to import a solution (managed) to one of our test environments we got the below error.

import

The reason being one of the SLA(s) that was part of the solution was in Active stage in the test environment to which solution was getting imported.

Deactivating the SLA and then importing the solution again worked properly.

Hope it helps..

Solved – System.ArgumentNullException: Value cannot be null.Parameter name: SandboxAppDomainHelper.Execute: The plug-in type could not be found in the plug-in assembly in Dynamics 365

We got the below error while in one of our plugin assemblies. 

As it turned out we were referencing the latest, version 9 Dynamics 365 assemblies in our plugin project, against our Dynamics 365 Environment which was still in version 8.2.

Adding the appropriate NuGet Package (i.e. 8.2.0.0) fixed the issue for us.

The helpful post

http://blogs.it.ox.ac.uk/benwalker/2017/09/12/system-io-fileloadexception-error-in-plugin-deployed-by-crm-developer-toolkit-to-dynamics-2015/

Hope it helps..

Microsoft.Crm.CrmException: GetAssemblyMetadata: expected mdtAssemblyRef or mdtAssembly while registering plugin assembly in Dynamics 365

While registering a plugin assembly through plugin registration tool we got the below error

The reason being we were using MSBuild.ILMerge.Task Nuget package and there were few assemblies being referenced in the plugin project that had copy local set as true.

https://nishantrana.me/2017/05/17/using-ilmerge-for-plugin-in-crm/

So eventually the single plugin assembly that was getting build had these assemblies also being merged in it, which led to the above error.

Setting Copy Local as False for those assemblies fixed the issue.

Hope it helps.

Empty or Disable cache while working with Web resources in Dynamics 365 (Chrome)

Most of the time while developing Web Resource we need to frequently update and publish it. We need to make sure that it is not cached and our changes are reflected instantly on publish.

For Chrome,

Open the Developer Tools (F12)

Press and hold the reload button and select “Empty Cache and Hard Reload” to have changes reflected.

https://stackoverflow.com/questions/14969315/whats-the-difference-between-normal-reload-hard-reload-and-empty-cache-a/14969509#14969509

The other option à Developer tools – Settings – Preferences

Hope it helps..

Hide “Sign in with an external account” from Dynamics 365 Portal

To hide the Sign in with an external account section from the Sign In and Register page of the portal.

Set the following site settings value to false à

Followed by Restart of the portal.

To add any additional JavaScript or HTML, for e.g. we wanted to disable the Email text box on the Register page,

Go to Portals à Content Snippets and create a new code snippet record

The output:-

code

The helpful post –

http://benitezhere.blogspot.ae/2018/01/hiding-sign-in-with-external-account.html

http://arpitmscrmhunt.blogspot.ae/2017/12/customise-registration-page-in-crm.html

Hope it helps..

Insufficient Security – You do not have the security priviges necessary to perform this task error while using Merge in Dynamics 365

Hi,

Recently one of our users got the below error while trying to merge Lead record.

The user was having the Merge rights. However, the user was missing Share rights on the Lead entity. He already had create, write, delete, append and append to rights.

More details here

https://msdn.microsoft.com/en-us/library/gg334602.aspx?f=255&MSPPError=-2147217396

Giving Share rights fixed the issue.

Hope it helps..