def get_user_apps(self, user_id):
self.clean_error()<EOL>try:<EOL><INDENT>url = self.get_url(Constants.GET_APPS_FOR_USER_URL, user_id)<EOL>apps = []<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 and json_data.get('<STR_LIT:data>', None):<EOL><INDENT>for app_data in json_data['<STR_LIT:data>']:<EOL><INDENT>if app_data:<EOL><INDENT>apps.append(App(app_data))<EOL><DEDENT><DEDENT><DEDENT>return apps<EOL><DEDENT>else:<EOL><INDENT>self.error = str(response.status_code)<EOL>self.error_description = self.extract_error_message_from_response(response)<EOL><DEDENT><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 apps accessible by a user, not including personal apps.

:param user_id: Id of the user
:type user_id: int

Returns the apps user identified by the id
:return: App list of the user
:rtype: list[App]

See https://developers.onelogin.com/api-docs/1/users/get-apps-for-user Get Apps for a User documentation