Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 1KrNbTVqmnhOoDMFaGzYlq
Power Pages - Design & Build
Answered

Unable to automate Web Role assignment in Enhanced Data Model

Like (0) ShareShare
ReportReport
Posted on 5 Nov 2023 15:12:15 by 3

There are criteria to determine authenticated users with enablement/ disablement of certain features on the website which I'm developing. I leveraged on Power Automate to determine those criteria, and automate the association of desired Web Role(s) with the corresponding Contact (Multiple Web Roles were predefined and associated with respective Web Pages accordingly). This was done well in the previous version, which was on Standard Data Model.

 

I just discovered this approach is no longer viable in Enhanced Data Model, since the N:N relationship between Web Role and Contact is no longer available/ visible. Tried to check this relationship schema through PowerApps, classic D365 customization, oData, all were no luck.

 

Manually assigning Web Role to Contact is definitely not acceptable by my client. Likely 2 ways to overcome:

  1. Fall back to Standard Data Model. (Gonna disable Enhanced Data Model and import solution over, not sure is this "fall back migration" feasible or not?)
  2. Manually show/ hide the menu and block access at page level with Liquid.

 

Your suggestion? Many thanks...

Categories:
  • miracules Profile Picture
    2 on 20 Feb 2024 at 13:17:47
    Re: Unable to automate Web Role assignment in Enhanced Data Model

    I´ve got the same problem but on unrelating from the web role. Relating using the example above works fine.

    miracules_0-1708435007031.png

     

  • Verified answer
    OOlashyn Profile Picture
    3,496 Most Valuable Professional on 05 Nov 2023 at 22:38:35
    Re: Unable to automate Web Role assignment in Enhanced Data Model

    Hi @ian_lim ,

    It is still possible, but a bit more complicated. In short: Enhanced Data Model doesn't have separate tables for many things. Instead, it uses a table called Site Components that holds everything (from Web Role, Site Setting to Web Files). Then MS uses plugins and some magic to present those records as separate tables via Virtual Tables. So the Web Role that you see for the Enhanced Data Model (table name mspp_webrole) is actually just an abstraction on top of the Site Component table. So to associate your Web Role to the Contact you actually need to associate Site Component table. On the Contact table you have the Relationship called powerpagecomponent_mspp_webrole_contact. Use that relationship and odata id of the web role (mspp_webrole one) to associate the table (you can get Odata id if you get that web role via Get Row action or in next format https://<orgname>.crm.dynamics.com/api/data/v9.1/mspp_webroles(<guid>)). 

    OOlashyn_0-1699224087805.png

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard

Featured topics