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

get a list of the calendar events for all users in a group

Hi,

I am trying to build a report showing 1: today's whereabouts for all users in a group.  2: tomorrows whereabouts for all users in a group.

So, I need to get a list of the calendar events for all users in a group.  Flow does not seem to allow access to other users calendar events!  I understand the Http GET function could be used to get a list of calendar events for a specified user.

  • Has anyone done this or have any idea how to achieve this?
  • Maybe there is another way?


Any help would be greatly appreciated.

5 REPLIES 5
yashag2255
Dual Super User II
Dual Super User II

Hi, 

 

The get calendar event(s) action in flow utilises the current connection created to outlook and fetches the data for that particular account. It will not get you the calendar details of any other account if that is what you are trying to do. 

 

Can you share some more details of what you are trying to do so that we may assist you better? 

 

Thanks, 

Hi

 

Yes - that is correct.  So, I understand the MS GRAPH will allow an HTTP GET and will return a list of events for the specified user.  See below

 

GET https://graph.microsoft.com/v1.0/me/calendar/events

 

- this should return a list of events for 'me'.  If I replace 'me' with the users 'principal name'  hopefully it will return a list of their events?

 

I don't know how to use the flow HTTP action to make the GET call........  Was hoping someone has an example?

v-lin-msft
Post Prodigy
Post Prodigy

Hi @jonneybravo,

I'm afraid there is no way to get a list of the calendar events for all users in a group by HTTP request at present.

Even when using HTTP request, the configuration also requires an account and password, which cannot be crossed, and may not be implemented.

Best Regards,

Community Support Team _ Lin Tu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Got a solution.

 

I'm using the MS Graph to get the schedule for a list of users.  The users can control the amount of information exposed to the call.

 

The catch is that I need to set up an app registration in AAD to handle the authentication in ms flow graph connector.

 

Trying to figure out if I can avoid this step as this will be a multi-tenant solution.  Does anyone have any ideas?

Hi JonneyBravo,

Personally, I think you need to change your approach. Whilst you could go the Graph route, getting that info for all your users is going to be a challenge and, to be honest, not one that I would take on in Flow. I’ll break this down into two suggestions.

To “keep it simple”, I would create a Flow that a single user attaches to their own calendar and runs on a schedule. This Flow can then write their calendar entries to a central SharePoint Lost (or other location) that shows their events. You might want to extend this to check for changes or deletions, or just purge that users entries and recreate them each time it runs. Then save this as a template and get each user to add it to their own Calendars. I’m sure you are trying to avoid this reliance on users though.

Next, your requirement to make this multi-tenant changes everything. Flow is not the right tool. It’s a single tenant entity. For a multi-tenant solution like this (you don’t state if it’s for a product that will scale to lots of tenants or just one or two you control) but for this I’d look to use an azure Function and do it in code with Graph. Store the tenant CliwntID and Secrets (yes you need to create the Azure AD apps) in a secure Azure Key Vault and then use Azure Functions (or durable functions) to go over all tenants and get the users calendar items. Then write them to the correct SharePoint Lists for each tenant or some central product data repository.

Hope this helps.

- Mark

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,078)