cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
carl1to
Frequent Visitor

Lookup to Users of Group (model-driven app)

Hi all,

 

I'm currently developing a model-driven app allows the user to start the creation of a new position within his team.

This app is based on a table called 'position requests'.  One field of this table is a lookup to OOB user table. In this field, the user can chose a person that is in charge of a subsequent tasks (for example an approver) for the current request. 

 

I would like to restrict the choice of users (approvers) to a group like for example Azure AD security group/office 365 group/users assigned with specific security role. Do you know how this can be achieved? 

 

A simpler alternative would be to create a separate table with users (approvers) you can chose from. Of course, an admin have to administer this table whener a person joins or leaves the approver position. How would you achieve this?

1 ACCEPTED SOLUTION

Accepted Solutions
dpoggemann
Super User
Super User

Hi @carl1to ,

There are a couple of things you can utilize here to accomplish your need.

1.  Azure Active Directory Security Groups can map to Teams in Dataverse.  See this article that talks about the approach of using AAD Security Groups to map users to Teams in Dataverse:  https://docs.microsoft.com/en-us/power-platform/admin/manage-group-teams 

2.  #1 will get you the group of users and then you could create a view in Dataverse on the User table that is setup to show only members of that team.  You can do by the Team id or I did by the Team Name in the example view I have created below

Screen Shot 2021-12-08 at 5.18.19 AM.png

 

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew

View solution in original post

4 REPLIES 4
dpoggemann
Super User
Super User

Hi @carl1to ,

There are a couple of things you can utilize here to accomplish your need.

1.  Azure Active Directory Security Groups can map to Teams in Dataverse.  See this article that talks about the approach of using AAD Security Groups to map users to Teams in Dataverse:  https://docs.microsoft.com/en-us/power-platform/admin/manage-group-teams 

2.  #1 will get you the group of users and then you could create a view in Dataverse on the User table that is setup to show only members of that team.  You can do by the Team id or I did by the Team Name in the example view I have created below

Screen Shot 2021-12-08 at 5.18.19 AM.png

 

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew

View solution in original post

Dear Drew,

 

Thank you for your reply.

This is absolutely brilliant and is exactly what I was looking for! 🙌🙌

 

Now if I would like to go one step further and use this app in 2 different business units, where each of the business units have its own approvers. Would this scenario be possible to do with this approach? How would you set up the structure?

2021-12-08 14_20_40-Zeichnung1 - Visio Standard.png

Thank you,

carlito

dpoggemann
Super User
Super User

Hi @carl1to ,

Teams can contain users across business units. so you could do either picture above.  When you talk "Approvers" is this through a Power Automate Approver step in a flow or something different?

 

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew
carl1to
Frequent Visitor

Hi Drew,

OK, thank you. 

 

Approval:

The process consists of 2 subsequent approval stages. The first is done by the approver that is picked from the list we spoke about. The second is done by the head of the BU. For that, a cloud-flow is attached to the business process flow table and is triggered when a row is modified. In this cloud-flow, an approval action is created and awaited.

 

Main components used in this model-driven app:

- dataverse table 'position request' (with the business rules defined on fields)

- business process flow upon this table with 4 stages: Create, Approve 1, Approve 2, HR-Tasks

- cloud-flow --> triggers approvals and notifications based on BPF stage

 

In the approvals and notifications, a deep link (dynamic record URL) is sent to the corresponding row in the model-driven app

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,950)