Forum Discussion

tomazk's avatar
tomazk
Copper Contributor
Jun 28, 2023

Internal server error response for learning content

Hey!

 

I'm trying to update learning content but get 500 internal server error response back.

 

I'm using `HttpClient` because I need to match with external ID. The call is:

 

Method: PATCH, RequestUri: 'https://graph.microsoft.com/v1.0/employeeExperience/learningProviders/<ProviderId>/learningContents(externalId='<LearningId>')', Version: 1.1, Content: System.Net.Http.StringContent, Headers:
{
  Authorization: Bearer <AccessToken>
  Content-Type: application/json; charset=utf-8
  Content-Length: 510
}

Body:
{
  "additionalTags": [],
  "contentWebUrl": null,
  "contributors": [],
  "createdDateTime": "2020-07-21T09:22:24.00991+02:00",
  "description": null,
  "duration": "PT0M",
  "externalId": "<Id>",
  "format": "<Format>",
  "id": null,
  "isActive": true,
  "isPremium": false,
  "isSearchable": true,
  "languageTag": "en-us",
  "lastModifiedDateTime": "2020-07-22T10:42:13.29695+02:00",
  "numberOfPages": "1",
  "skillTags": [],
  "sourceName": "<Source>",
  "thumbnailWebUrl": "<ImageUrl>",
  "title": "<Title>"
}

 

Initially I also tried with `graphApiClient.EmployeeExperience.LearningProviders[<providerID>].LearningContents[<contentID>].PatchAsync()` but that was also failing.

 

I'm using GraphApi 5.14.0. All IDs, token and other placeholders in above sample are correct since GETting the list of learnings works. API permissions in Azure should suffice and they are all granted admin consent (`application LearningContent.ReadWrite.All` and `delegated LearningProvider.ReadWrite`). So it seems there's something wrong with my PATCH but I can't figure it out...

No RepliesBe the first to reply

Resources