Get user info for Azure user: get zero Content-Length header

Viewed 67

I'm trying to receive user info according to Azure protocol: https://docs.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http. I use native WinApi (WinHttp) functions. Before reading the response buffer I call f-n WinHttpQueryHeaders() with dwInfoLevel = WINHTTP_QUERY_CONTENT_LENGTH, in order to receive the Content-Length. Few months ago everything worked OK (and the Content-Length was non-zero), but recently something has been changed and this field just not exist (see next image), of cause I have an error 'ERROR_WINHTTP_HEADER_NOT_FOUND'. Full headers buffer I've found that if the transfer-encoding is 'chunked', the Content-Length header is omitted, so, it looks like a legal situation. Now, in order to receive possible response buffer size, I use f-n WinHttpQueryDataAvailable(), and it works correct. The question is: what has been changed at Azure side? What about future changes, do we need to adapt our code after any change on Azure? Thanks.

1 Answers

The question is: what has been changed at Azure side? What about future changes, do we need to adapt our code after any change on Azure?

There is the Microsoft Graph Changelog: https://developer.microsoft.com/en-us/graph/changelog. It doesn't change the User response body recently, and it probably doesn't change in the future, because it's going to have a big impact.

You could contact the Microsoft supporter and provide your request-id.

Related