Retrofit not able to return response body... okhttp loggin interceptor shows body is recieved

We are basically trying to use retrofit as a rest client to oauth.

For the same we are trying to get client credential grant.

So we make rest call to token endpoint passing all url encoded parameters.

Call is successful as we get 200 in response code. Okhttp loggin interceptor shows response body to contain access_token and other field.

However, retrofit response is not able to parse the accesstoken model. token comes as blank.

        log.info("Passing input as Body in x-www-form-urlencoded");
        //log.info("config.getApiKey() && config.getApiSecret()=="+config.getApiKey()+" "+ config.getApiSecret());
        inputBody.put(GRANT_TYPE, CLIENT_CREDENTIALS);
        inputBody.put(CLIENT_ID, "abcd");
        inputBody.put(CLIENT_SECRET, "d=");
        inputBody.put(RESOURCE, HTTPS_GRfgeAPH_WINDOWS_NET);
        log.info("inputBody=="+inputBody.get(CLIENT_ID));
        /*if(handleResponse(azureLoginTokenService.getToken(inputBody).execute())!=null){
            log.info("inside if");
            tokenOutput.setAzureLoginTokenModel(handleResponse(azureLoginTokenService.getToken(inputBody).execute()));
            clientCredentialGrantToken = tokenOutput.getAzureLoginTokenModel().getAccessToken();
            isTokenExpired = false;
            return clientCredentialGrantToken;
        }
        else{

            log.info ("Could not fetch azure token!!!!!");
            return null;
        }

*/ log.info("inside if"); //AzureLoginTokenModel azureToken = handleResponse(azureLoginTokenService.getToken(inputBody).execute()); AzureLoginTokenModel azureToken = azureLoginTokenService.getToken(inputBody).execute().body(); log.info("Token Model"+azureToken.getAccessToken());

@JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "token_type", "expires_in", "ext_expires_in", "expires_on", "not_before", "resource", "access_token" }) public class AzureLoginTokenModel {

@JsonProperty("token_type")
private String tokenType;
@JsonProperty("expires_in")
private String expiresIn;
@JsonProperty("ext_expires_in")
private String extExpiresIn;
@JsonProperty("expires_on")
private String expiresOn;
@JsonProperty("not_before")
private String notBefore;
@JsonProperty("resource")
private String resource;
@JsonProperty("access_token")
private String accessToken;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();

@JsonProperty("token_type")
public String getTokenType() {
    return tokenType;
}

@JsonProperty("token_type")
public void setTokenType(String tokenType) {
    this.tokenType = tokenType;
}

@JsonProperty("expires_in")
public String getExpiresIn() {
    return expiresIn;
}

@JsonProperty("expires_in")
public void setExpiresIn(String expiresIn) {
    this.expiresIn = expiresIn;
}

@JsonProperty("ext_expires_in")
public String getExtExpiresIn() {
    return extExpiresIn;
}

@JsonProperty("ext_expires_in")
public void setExtExpiresIn(String extExpiresIn) {
    this.extExpiresIn = extExpiresIn;
}

@JsonProperty("expires_on")
public String getExpiresOn() {
    return expiresOn;
}

@JsonProperty("expires_on")
public void setExpiresOn(String expiresOn) {
    this.expiresOn = expiresOn;
}

@JsonProperty("not_before")
public String getNotBefore() {
    return notBefore;
}

@JsonProperty("not_before")
public void setNotBefore(String notBefore) {
    this.notBefore = notBefore;
}

@JsonProperty("resource")
public String getResource() {
    return resource;
}

@JsonProperty("resource")
public void setResource(String resource) {
    this.resource = resource;
}

@JsonProperty("access_token")
public String getAccessToken() {
    return accessToken;
}

@JsonProperty("access_token")
public void setAccessToken(String accessToken) {
    this.accessToken = accessToken;
}

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}

@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}

}

Body being parsed ...

{ "token_type": "Bearer", "expires_in": "3600", "ext_expires_in": "0", "expires_on": "1519203625", "not_before": "1519199725", "resource": "https://graph.windows.net", "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlNTUWRoSTFjS3ZoUUVEU0p4RTJnR1lzNDBRMCIsImtpZCI6IlNTUWRoSTFjS3ZoUUVEU0p4RTJnR1lzNDBRMCJ9.eyJhdWQiOiJodHRwczovL2dyYXB" }

Retrofit response is not present in even response.raw >>>