code: public Privilege getPrivilege(String id) throws OAuthSystemException, OAuthProblemException, URISyntaxException {
  		cleanError();
  		prepareToken();
  
  		URIBuilder url = new URIBuilder(settings.getURL(Constants.GET_PRIVILEGE_URL, 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);
  
  		Privilege privilege = null;
  		OneloginOAuth2JSONResourceResponse oAuth2Response = oAuthClient.resource(bearerRequest, OAuth.HttpMethod.GET, OneloginOAuth2JSONResourceResponse.class);
  		if (oAuth2Response.getResponseCode() == 200) {
  			JSONObject data = oAuth2Response.getJSONObjectFromContent();
  			privilege = new Privilege(data);
  		} else {
  			error = oAuth2Response.getError();
  			errorDescription = oAuth2Response.getErrorDescription();
  		}
  		return privilege;
  	}
docs: Get a Privilege
  
  @param id
  The id of the privilege you want to update.
  
  @return Privilege
  
  @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.Privilege
  @see <a target="_blank" href="https://developers.onelogin.com/api-docs/1/privileges/get-privilege">Get Privilege documentation</a>