Asool
Asool

Reputation: 14199

Microsoft Graph Client - Filter

I'm trying to get a list of all calendars that the authenticated user owns.

The following code works, but doesn't specify that I want calendars the authenticated user owns.

await this.graphClient
                .api('/me/calendars')
                .select('name, id, canEdit, owner')
                .get();

When I added

await this.graphClient
                .api('/me/calendars')
                .select('name, id, canEdit, owner')
                .filter(`equals(owner.address, '${this.authenticatedUserEmail}')`)
                .get();

I get no result ( I should get 4 results ). I'm assuming this is because of the way I wrote .filter

Basically owner is an object with name and address .

How do i fix this?

Upvotes: 1

Views: 1319

Answers (1)

baywet
baywet

Reputation: 5342

As Vadim pointed out, this is a complex property, not a linked entity.
This means this filter cannot work and the filter cannot be applied.

Upvotes: 1

Related Questions