user3071698
user3071698

Reputation: 73

How can I get a list of Class Assignments using the Graph API?

When I execute this:

GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var assignments = await graphClient
  .Education
  .Classes["classId"]
  .Assignments
  .Request()
  .GetAsync();

It returns this error:

IEducationClassRequestBuilder does not contain a definition for 'Assignments' and no extensible definition method...

But call the following from Graph Expolorer returns the expected list of assignments.

https://graph.microsoft.com/beta/education/classes/{id}/assignments

Any pointers, please? Running out of hair to pull out LOL, cheers

Upvotes: 2

Views: 185

Answers (1)

Marc LaFleur
Marc LaFleur

Reputation: 33094

The educationAssignment resources and endpoints are still in Beta and therefore not included in the main Microsoft Graph .NET Client Library.

In order to access Beta resources/endpoints, you'll need the Microsoft Graph Beta .NET Client Library.

Upvotes: 3

Related Questions