user310988
user310988

Reputation:

Can PlannerTasks be expanded to include their related Details property?

I've written a query which I thought would return the PlannerTasks in a PlannerPlan, with their details property populated.

var tasks = await graphServiceClient
    .Planner
    .Plans[this.planId]
    .Tasks
    .Request()
    .Expand("details")
    .GetAsync();

But it gave an error:

Specified expansions, filters, or select statements are not supported for this query.

This appears to mean that Expand on Details isn't supported, but it's not specific about that, and it doesn't say why.

Is it not supported at all?

Is it because I'm doing it in a way that isn't supported, but there's another way that is?

I had a look at the documentation for Expand and it said:

Note: Not all relationships and resources support the $expand query parameter. For example, you can expand the directReports, manager, and memberOf relationships on a user, but you cannot expand its events, messages, or photo relationships. Not all resources or relationships support using $select on expanded items.

But the documentation doesn't appear to detail which relationships are or aren't expandable.

So I can't tell if I'm taking the wrong approach, that it's not supported and I should move on, or if it's a bug.

One final question, if expand isn't supported for Details, does that mean I have to make a call for each task individually?

Upvotes: 0

Views: 181

Answers (1)

Tarkan Sevilmis
Tarkan Sevilmis

Reputation: 1508

You can now expand details while reading tasks in a plan.

Outdated Reply:

Expansion of task details is not supported when querying any lists of tasks (e.g. tasks in a plan). Task details object can contain large blocks of data, it is not meant to be queried across tasks.

Upvotes: 1

Related Questions