WinHttpReceiveResponse: 12044: A certificate is required to complete client authentication
I keep getting 12044 error when using Bearer token auth while making a Post/Put calls using http_client. I am not using the oauth2 config since I have a different mechanism to get the access token. So, all I am doing is adding the access token with 'Bearer' prefix to the authorization header: requestmessage.headers().add(L"Authorization", L"Bearer " + accessToken);
But it keeps giving me the following error: WinHttpReceiveResponse: 12044: A certificate is required to complete client authentication
Sounds like the particular web server you are connecting to requires a client certificate via mTls. This failure indicates that it's never getting far enough to even consider your Auth token, so that's not the problem. As far as I know mTLS is not yet supported in cpprestsdk. You'd have to add modify the WinHttp client to supply a client cert when this event is encountered.
@mandarsudame I am currently struggling with the same problem as you did. Can you tell how you solved it in the end?
@mandarsudame @magel20 I am also facing same issue since 2 weeks can you please let me know what is the solution for this Thanks