code: public List<Integer> getUserRoles(long id) throws OAuthSystemException, OAuthProblemException, URISyntaxException {
  		cleanError();
  		prepareToken();
  
  		URIBuilder url = new URIBuilder(settings.getURL(Constants.GET_ROLES_FOR_USER_URL, Long.toString(id)));
  
  		OneloginURLConnectionClient httpClient = new OneloginURLConnectionClient();
  		OAuthClient oAuthClient = new OAuthClient(httpClient);
  		OAuthClientRequest bearerRequest = new OAuthBearerClientRequest(url.toString())
  			.buildHeaderMessage();
  
  		Map<String, String> headers = getAuthorizedHeader();
  		bearerRequest.setHeaders(headers);
  
  		List<Integer> roles = null;
  		OneloginOAuthJSONResourceResponse oAuthResponse = oAuthClient.resource(bearerRequest, OAuth.HttpMethod.GET, OneloginOAuthJSONResourceResponse.class);
  		if (oAuthResponse.getResponseCode() == 200) {
  			roles = oAuthResponse.getIdsFromData();
  		} else {
  			error = oAuthResponse.getError();
  			errorDescription = oAuthResponse.getErrorDescription();
  		}
  		return roles;
  	}
docs: Gets a list of role IDs that have been assigned to a user.
  
  @param id
  Id of the user
  
  @return List of Role Ids
  
  @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection
  @throws OAuthProblemException - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemException is enabled
  @throws URISyntaxException - if there is an error when generating the target URL at the URIBuilder constructor
  
  @see com.onelogin.sdk.model.Role
  @see <a target="_blank" href="https://developers.onelogin.com/api-docs/1/users/get-roles-for-user">Get Roles for a User documentation</a>