cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dennisb88
Resolver III
Resolver III

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
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
Users online (2,411)