Share via

A type named 'microsoft.graph.externalReference' could not be resolved by the model

Nedim Jahic 1 Reputation point
2022-07-12T21:36:29.117+00:00

I am trying to add a reference to a PlannerTask using the java SDK v5.29.0.

After creating PlannerTaskDetails object and adding the reference with oDataType="#microsoft.graph.externalReference"

I send the patch request:
graphClient.planner().tasks(taskId).details().buildRequest(new HeaderOption(IF_MATCH, this.detailsEtag)).patch(details)
..and receive the following error:

com.microsoft.graph.http.GraphServiceException: Error code:   
Error message: The request is invalid:  
A type named 'microsoft.graph.externalReference' could not be resolved by the model. When a model is available, each type name must resolve to a valid type.  

I haven't had any problems with oDataType on other models, so I am thinking this might be a bug?

Anyone have an idea?

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Nedim Jahic 1 Reputation point
    2022-07-13T19:09:59.697+00:00

    Resolved by using "#microsoft.graph.plannerExternalReference" as odataType.

    The examples in the official documenation refer to the old type I guess -> https://learn.microsoft.com/en-us/graph/api/resources/plannerexternalreferences?view=graph-rest-1.0

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.