Hi @iz111
When you get an access token, it is actually an object that contains JSON key-value pairs, and you only need to pass the Token
value. So please change your code to:
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accesstoken.Token);
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.
Seems that authResult was for some reason reset to null in my case.