Azure-sdk-for-java: RefreshTokenService does not send client secret. Unable to refresh token

Created on 11 Sep 2019  路  3Comments  路  Source: Azure/azure-sdk-for-java

RefreshTokenService interface in RefreshTokenClient is defined as the following :

private interface RefreshTokenService {
@FormUrlEncoded
@POST("{tenant}/oauth2/token")
Observable refreshToken(
@Path("tenant") String tenant,
@Field("client_id") String clientId,
@Field("grant_type") String grantType,
@Field("resource") String resource,
@Field("refresh_token") String refreshToken);

While the {tenant}/oauth2/token endpoint is expecting a client_secret parameter.
This causes a "401 Unauthorized" response which blocks from refreshing the token.

Authentication Client bug customer-reported

Most helpful comment

Hi @amitbaer We just fixed this in our 1.6.13 version of azure-client-authentication: https://github.com/Azure/autorest-clientruntime-for-java/releases/tag/v1.6.13. Please give it a try.

All 3 comments

Hi @amitbaer We just fixed this in our 1.6.13 version of azure-client-authentication: https://github.com/Azure/autorest-clientruntime-for-java/releases/tag/v1.6.13. Please give it a try.

HI @amitbaer we believe this issue to be fixed in the latest azure-client-authentication. Please feel free to reactivate the github issue if there's another problem, this update doesn't resolve your original problem as we believe it should, or if there has been any misunderstanding on our part.

Thanks,
Josh

Thanks for working with Microsoft on GitHub! Tell us how you feel about your experience using the reactions on this comment.

Was this page helpful?
0 / 5 - 0 ratings