def get_privileges(self):
self.clean_error()<EOL>try:<EOL><INDENT>url = self.get_url(Constants.LIST_PRIVILEGES_URL)<EOL>privileges = []<EOL>response = self.execute_call('<STR_LIT>', url)<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>json_data = response.json()<EOL>if json_data:<EOL><INDENT>for privilege_data in json_data:<EOL><INDENT>privileges.append(Privilege(privilege_data))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.error = self.extract_status_code_from_response(response)<EOL>self.error_description = self.extract_error_message_from_response(response)<EOL><DEDENT><DEDENT>return privileges<EOL><DEDENT>except Exception as e:<EOL><INDENT>self.error = <NUM_LIT><EOL>self.error_description = e.args[<NUM_LIT:0>]<EOL><DEDENT>
Gets a list of the Privileges created in an account.

Returns the list of privileges
:return: privileges list
:rtype: list[Privilege]

See https://developers.onelogin.com/api-docs/1/privileges/list-privileges List Privileges documentation