cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dennisb88
Helper V
Helper V

Filter a Microsoft Graph call

Hi all,

 

I'm get calendar items with the graph API, that's working fine. But I try to add a filter in my call.

 

The filter I try to add is that I want only the out of office events. They are showed by the showAs property as 'oof'.

 

So I tried a couple of things, but my flow failed with the error that the filter action is not valid.

I add the follow URI:

 

 

https://graph.microsoft.com/v1.0/users/<EMAILADRES>/calendarView?startDateTime=@{utcNow()}&endDateTime=@{addDays(utcnow(),30)}&$filter=startswith(showAs,'oof')

 

dennisb88_0-1632404444726.png

 

FYI: Without the filter it's working fine.

Does anyone know how I can filter this right?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @dennisb88,

 

Have you tried using an equals instead of a startswith. Or do you have a specific requirement that you are using a startswith?

 

https://graph.microsoft.com/v1.0/users/<EMAILADRES>/calendarView?startdateTime=2021-06-15&endDateTime=2021-09-15&$filter=showAs eq 'oof'

View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @dennisb88,

 

Have you tried using an equals instead of a startswith. Or do you have a specific requirement that you are using a startswith?

 

https://graph.microsoft.com/v1.0/users/<EMAILADRES>/calendarView?startdateTime=2021-06-15&endDateTime=2021-09-15&$filter=showAs eq 'oof'

View solution in original post

The eq is working fine! I had not a specific requirement for that! So thank you for helping me out!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (966)