cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
beckyjc
New Member

List users in Dynamics 365 field security profile

Hi,

 

Does anybody have a way of listing users (i.e. in order to send them an SMS and email) who are members of a particular Dynamics 365 field security profile? I'm new to flow and struggling to see any obvious way to do this but it feels like it should be possible. 

 

Thanks,

Becky

3 REPLIES 3
abm
Super User
Super User

Hi @beckyjc 

 

See below steps will explain how to retrive users from a specified field security level. 

 

Here I am using a manual trigger. Then intialised a variable called SecurityProfile. This is used later for storing the GUID of specified field level security group. Here my group is called 'Special Group'. Next step we need to use the List records. Here I am using the filter query. Please see below steps.

 

sec1.png

 

Next step we need a loop to extract the value of the 'Special Group' Id (GUID). See below.

 

sec2.png

 

Next we need to retrieve all the users falls under the above field security group. Here I am using FetchXML query and I am mapping the above GUID for the filter. You can use ODATA for the filter as well. I am taking the easy route here 🙂

 

sec3.png

 

Next we need to pass the results. Here I am using Parse JSON.

 

sec4.png

 

Below is the JSON Schema.

{
"type": "object",
"properties": {
"@@odata.context": {
"type": "string"
},
"value": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@@odata.etag": {
"type": "string"
},
"fullname": {
"type": "string"
},
"_businessunitid_value": {
"type": "string"
},
"systemuserid": {
"type": "string"
},
"ownerid": {
"type": "string"
}
},
"required": [
"@@odata.etag",
"fullname",
"_businessunitid_value",
"systemuserid",
"ownerid"
]
}
}
}
}
 
sec5.png

Next we need another loop to extract the user details. Here I am using a compose step to display Fullname of the users. In your case you need to find the email and add another step called email. Another method is collect all the emails of the users and send one email to all users.

 

Hope it make sense. If you need any more help please let me know.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hi @abm ,

 

Thank you for the detailed response, this looks to be exactly what I needed.  Will try it ASAP and report back!

 

Thanks again,

Becky

Hi @beckyjc 

 

If you need any further help in this please let me know.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,106)