News Ticker

Hiding SiteMap Components based on User Profile


I have a customer who wanted to define a role based UI for its Sales, Marketing and Services departments. The role based SiteMap configuration rather not been possible with Dynamics CRM 2013’s standard product features. In this post, I would discuss how this requirement can be achieved inside CRM 2013.

Problem Statement

Before we begin, here is a quick recap of the problem statement. We need to define a SiteMap based of the following matrix:

SiteMap Matrix

Solution

The Dynamics CRM Security Roles does help us in setting up separate security privileges on the data that is viewed by various Job profile. While Security Role has some control on the navigation elements like if a Security Role does not provide any access to an entity, the entity navigation does not appear in the UI; however Security Roles do not fully control the SiteMap Navigation elements like the SiteMap Areas of Sales, Marketing, Services, Help and Settings.

Here we would discuss the solution for the problem.

  1. Create one entity for each area in the SiteMap, like:
  • SalesSiteMap
  • MarketingSiteMap
  • ServicesSiteMap
  • HelpSiteMap
  • SettingsSIteMap

While creating these entities do not to select any options as shown below:

SiteMap Entity Definition

  1. Create the following Security Roles:
    • Sales Section Accessor
    • Marketing Section Accessor
    • Services Section Accessor
    • Settings Section Accessor
    • Help Section Accessor

For each of these security roles, only configure access rights for the custom entities created in Step 1. Leave the rest of the configuration empty.

SiteMap Security Role Matrix

Below is shown how Sales Section Accessor security role would be configured:

SiteMap Security Role Definition

  1. Next step is to customize the SiteMap. The best tool to get this done is the XrmToolbox. Download the tool and install it. Then connect to the CRM instance and launch the Site Map Editor. Next step would be to Load the SiteMap.

SiteMap Editor

  1. Then expand the Area (SFA) section. Then modify the Privilege for each SubArea to the SalesSiteMap entity as shown below:

SiteMap Modification

  1. Now expand the Area (CS) section. Then modify the Privilege for each SubArea to the ServicesSiteMap entity.
  2. Expand the Area (MA) section. Then modify the Privilege for each SubArea to the MarketingSiteMap entity.
  3. Expand the Area (Settings) section. Then modify the Privilege for each SubArea to the SettingsSiteMap entity.
  4. Finally expand the Area (HLP) section. Then modify the Privilege for each SubArea to the HelpSiteMap entity.
  5. After modifying the SiteMap, Save the SiteMap using Save SiteMap button.
  6. Now provide the security roles to the users as per the following matrix:

Job Role Matrix

Now when the user logs-in to the system they would see only the sections defined in the problem statement here.

Salesperson SiteMap

About Dipankar Bhattacharya (59 Articles)
A multi-skilled Dynamics 365 Professional with strong experience in delivering IT projects especially across multiple industries. A Microsoft technology evangelist, a regular speaker at tech events, blogger and avid reader. Certified IT Architect and well versed in Solution Architecture of Business Applications using Microsoft platforms like Dynamics 365, Azure and Office 365.

2 Comments on Hiding SiteMap Components based on User Profile

  1. Hi Dipankar,

    does this solution work with mobile UI also (tablet use)?

    regards,
    Harri

  2. Shilpa Pahuja // March 31, 2017 at 1:18 PM // Reply

    Is the above solution still works with Dynamics 365 apps? Because i am not achieve that in 8.2 version.

    Regards,
    Shilpa

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: