This is the implementation class to get Token but while i am making a POST call its throwing me Internal Server Error, Could anyone help me out on this
MultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>();
map.add("client_id", "clientId");
map.add("tenant_id", "tenantId");
map.add("client_secret", "clientSecret");
map.add("scope", "scope");
map.add("grant_type", "granttype");
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<MultiValueMap<String, String>>(map, headers);
ResponseEntity<Response> response = resttemplate.postForEntity(
"https://login.microsoftonline.com/{tenantId}/${tokenversion}/token", request, Response.class,tenantId,tokenversion);
return response.getBody().getAccess_token();
}
A 500 series error means something wrong and unexpected happened on the server side. The problem is not with your query. You should try to contact microsoft (ie put in a bug report) about this
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.