web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get Outlook Calendars ...
Power Apps
Answered

Get Outlook Calendars schedule with specific condition

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello Guys,

 

I'm trying to make a collection table (Collect) from 365 Outlook Calendars schedule with a specific conditions.

Here is my condition.

  • User Department: “Sales” only
  • Event title :“Manager Meeting”
  • “all day event” only

 

I would like to take a “start date” and “user name” form those schedules.

Can someone help me?

 

Thanks

Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Please try with this code.

    ClearCollect(ColEvents, Office365Outlook.CalendarGetItems(CalendarID,{'$top':999}).value);
    ClearCollect(ColFilteredEvents, Filter(ColEvents,IsAllDay, Office365Users.UserProfileV2(Organizer.EmailAddress.Address).department="Sales", Subject="Manager Meeting")

     The ColFilteredEvents collection is what you want.

    Hope this helps.

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-siky-msft 
    Thank you for your help.😄

    It shows error.😅 

     

     

    paint.png

     

     

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    OK, You need to add Office365 outlook connection to the app. And then Modify the code as follows.

    ClearCollect(
     ColEvents,
     Office365Outlook.CalendarGetItems(
     LookUp(
     Office365Outlook.CalendarGetTablesV2().value,
     name = "Calendar"
     ).id,
     {'$top': 999}
     ).value
    );
    ClearCollect(
     ColFilteredEvents, 
     Filter(
     ColEvents,
     IsAllDay,
     Office365Users.UserProfileV2(Organizer.EmailAddress.Address).department="Sales",
     Subject="Manager Meeting"
     )
    )

     Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-siky-msft 
    Thank you for your help!

     

    I've checked that I could get  "ColEvents" from your advice.

    but was my calendar item...😅

    Is it possible to "getitems" from all of my sales department's?

    If that is not possible, I have a list of collection of sales members. Could that help to getitems😥?

     

    ClearCollect(
     ColEvents,
     Office365Outlook.CalendarGetItems(
     LookUp(
     Office365Outlook.CalendarGetTablesV2().value,
     name = "Calendar"
     ).id,
     {'$top': 999}
     ).value
    );

     

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Yes, try to filter the calendar items that the Organizer Email is in the sales members collection.

    ClearCollect(
     ColFilteredEvents, 
     Filter(
     ColEvents,
     IsAllDay,
     Organizer.EmailAddress.Address in 'SaleMembersCollection',
     Subject="Manager Meeting"
     )
    )

     Hope this helps,

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-siky-msft 

     

    Thanks,

    ColFilteredEvents ,is created only form my calendar.

    but the calendar event I would like to get is not in mine.😅

     

    How can I  get my sals member's calendar event??

    I would like to do someting like this.

    ClearCollect(
     ColEvents,
     Office365Outlook.CalendarGetItems(
     LookUp(
     Office365Outlook.CalendarGetTablesV2().value,
     department = "sales" or mailaddress = "**@***com"
    ).id, {'$top': 999} ).value );

     

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    ClearCollect(
     ColFilteredEvents, 
     Filter(
     ColEvents,
     IsAllDay,
     Organizer.EmailAddress.Address in 'SaleMembersCollection',
     Subject="Manager Meeting"
     )
    )

    This code will get all events that organizer's email is in the SaleMembersCollection.

    However, there is no way to retrieve other users' calendar event list, Office 365 Outlook connector can only output all events from your own calendar(whatever you are organizer or attendee), 

    Hope this helps.

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

     

    @v-siky-msft 
    Thank you so much😊

    "there is no way to retrieve other users' calendar event list",  this was what I wanted to know.😁

     

    I will use shared calendar 🙂

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Get-Calendar-from-Outlook-Group/m-p/568318#M176417

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    For anyone stumbling across this years later, you CAN retreive calendar info for other users as follows:

    ClearCollect(colMYCOLLECTION, 
     Office365Outlook.CalendarGetTablesV2().value
    )

    (that will get just the calendar "ID" and "name" which you can then use to retreive events)

    however their calendar must be shared with you (or a security group you are in). The "People in my organisation" sharing doesn't work for this, only explicit shares so you may need to share every calendar with the applicable PowerApps users. Just be aware that when you share a calendar to a group, it emails every member and they have to press the "accept" button. Quite a pain if you want to build an app for an entire company where every user can see every other staff member's calendar (event titles and locations).
    Hope that helps someone.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard