def get_custom_attributes(self):
        """

        Gets a list of all custom attribute fields (also known as custom user fields) that have been defined for OL account.

        Returns the custom attributes of the account
        :return: custom attribute list
        :rtype: list[str]

        See https://developers.onelogin.com/api-docs/1/users/get-custom-attributes Get Custom Attributes documentation

        """
        self.clean_error()

        try:
            url = self.get_url(Constants.GET_CUSTOM_ATTRIBUTES_URL)

            custom_attributes = []
            response = self.execute_call('get', url)
            if response.status_code == 200:
                json_data = response.json()
                if json_data and json_data.get('data', None):
                    custom_attributes = json_data['data'][0]
                return custom_attributes
            else:
                self.error = str(response.status_code)
                self.error_description = self.extract_error_message_from_response(response)
        except Exception as e:
            self.error = 500
            self.error_description = e.args[0]
def get_custom_attributes ( self ) : self . clean_error ( ) try : url = self . get_url ( Constants . GET_CUSTOM_ATTRIBUTES_URL ) custom_attributes = [ ] response = self . execute_call ( 'get' , url ) if response . status_code == 200 : json_data = response . json ( ) if json_data and json_data . get ( 'data' , None ) : custom_attributes = json_data [ 'data' ] [ 0 ] return custom_attributes else : self . error = str ( response . status_code ) self . error_description = self . extract_error_message_from_response ( response ) except Exception as e : self . error = 500 self . error_description = e . args [ 0 ]
Gets a list of all custom attribute fields (also known as custom user fields) that have been defined for OL account.

        Returns the custom attributes of the account
        :return: custom attribute list
        :rtype: list[str]

        See https://developers.onelogin.com/api-docs/1/users/get-custom-attributes Get Custom Attributes documentation