Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Answered

how to add role base restriction to views in Dynamics 365 marketing

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi 

We have two different clients using D365 marking for sending out marketing emails. 

I created two apps (AppA and appB) based on D365 marketing for those clients. However, Client A used AppA to create customer journeys, marketing emails, segments for their needs.  when client B tries to create customer journeys, marketing emails, and segments using AppB. The client B can see all the customer journey, marketing emails, and segments created by Client A.

How I can display the customer journeys, marketing emails and segments only belongs to Client B or Client A.

Thank you,

Siva

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to add role base restriction to views in Dynamics 365 marketing

    Thanks a lot Clofly,

    I followed the simple way using this URL. it is working now.

    www.azamba.com/.../

  • Verified answer
    cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: how to add role base restriction to views in Dynamics 365 marketing

    Hi Siva,

    You could refer to following two approach:

    Simple way:

    Add Client A and Client B to different business units,(those two BUs should be at same level.) then set Read Privilege on Customer Journey, Marketing Email and Segment of Client A and Client B's security roles to BU level.  

    https://www.azamba.com/2018/04/26/how-to-restrict-records-by-business-unit-in-microsoft-dynamics-365-for-sales-crm/

    Pros: Records that what Client A and Client B can see will be totally restricted, they can't find records which belong to other clients even with Advanced Find.

    Cons: They need to be added to different BUs.

    Complex way:

    Register a plugin within the PreOperation stage of RetrieveMultiple request, pass custom filters to the view.

    (RetrieveMultiple: It will trigger every time Dynamics loads any grids: views and subgrids.)

    In the plugin, check name of the current user, if current user is Client A, then adding a filter " owner eq 'Client A' " to query of context to only show records which belong to client A.

    https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/org-service/samples/modify-query-preoperation-stage

    https://medium.com/@chirag.kanzariya/uci-dynamics-crm-how-to-use-retrievemultiple-plugin-to-pass-custom-code-in-subgrid-f64c99f329ce

    Pros: Client A and Client B can be in the same business unit.

    Cons: Writing code is required.

    Regards,

    Clofly

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,074 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,900 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans