How to: use Power Automate to show events to a specific target audience

Applies to: Event Management for Office 365/SharePoint online

Follow this guide if you only want to show events to specific target audiences, if you want to decide per event if the event should be visible to all users or just to specific users or groups. This guide describes how to do this using Power Automate. This Power Automate flow can be used to set unique permissions on items depending on the users or groups entered in a Person or Group column.

Create the Target Audience column

First you have to create a new Person or Group column in the Scheduled Events list that can be use to specify the target audiences.

Create new Person or Group column

Make sure Allow selection of Groups and Allow multiple selections is enabled.

We also need to use the internal column name in the Power Automate flow to get the users and groups specified. To get the internal column name, click on the new column header and click on Filter.

Filter the column

Now select @Me and click on Apply.

Filter by me

In the URL you can now view the internal column name in the FilterField1 query string parameter.

Get internal column name

We need the internal column name later when creating the Power Automate flow.

The Power Automate Flow

To make it easier for you to configure the flow, we created a flow template that you can import into Power Automate.

Download the flow template

Open Power Automate, click on My flows and then on Import.

Import flow template

Select the downloaded flow template ZIP package and click Import.

Now you have to change the resource connections. In the IMPORT SETUP column click on Select during import and create new connections for all resources.

Update flow connections

Now click on Import.

After importing the workflow, click Open Flow at the top.

Open flow

Update the trigger and the 2 following actions. In the trigger, select your Event Management website and the Scheduled Events list. In the Initialize variable Site URL action, also enter the URL of the SharePoint website and in the Initialize variable TargetAudienceColumnName action, enter the internal name of your Target Audience column (see above).

Update flow trigger and actions

Also review all the other steps to make sure they meet your needs. The flow starts whenever an event is created or changed. If users or groups are specified in the target audience column, this breaks the permission inheritance and separate permissions will be assigned to the event. The website owners and members always receive permissions. In addition, the specified users and groups will receive Read permissions. If the user column is empty, permissions will be inherited from the parent level.

After you have updated the flow, save it and click on the arrow at the top left to go back to the flow overview. Here you can activate the flow by clicking on Turn on.

Now click on Edit again to test the flow via Test / Manually. Simply create a new event in the Scheduled Events list and enter one or multiple users or groups in your target audience column.

I hope you found this guide useful. If you have any questions, please send an e-mail to [email protected].