I also do have the same error in PHP programming.. Can anyone here to sort it out ?
error "Error content type text/html does not have a factory registered to be parsed" when using golang sdk for a request to the api
Goal: Requesting the calendars of a user
Via the azure students programm I created an App in the Microsoft Azure Directory with the purpose of using the calendar api to request data from users. I want this to happen in the background with no futher manual authentication so i chose the ClientSecretCredential-workflow and configured the secret and everything.
my permissions:
I used the example code for the app authentication with go and I can succesfully request a list of Users for my application. But when i use the id of the user (I got the id from the request) and try to access the calendar, events or anything else of the User i get an error message.
my code:
result, err := g.appClient.Users().ByUserId("user-idf").Calendars().Get(context.Background(), nil)
if err != nil {
fmt.Println("Got Error:", err.Error())
}
fmt.Println(result)
my error
content type text/html does not have a factory registered to be parsed
The exact same request with the same user id works via "Me" and a logged in user with a different authentication flow and via the graph explorere. But i need it to work without an authenticated user in the background