Welcome to the new Box Support website. Check out all the details here on what’s changed.

Comments

2 comments

  • Nayak

    Hi , As you cannot fetch only inactive users from Box, you need to fetch all users and then filter the results something like:

    users = client.users(user_type='managed')
    for user in users:
      if user.status == 'inactive':
        print('User Login: {1}'.format(user.login))

    1
    Comment actions Permalink
  • KobiVaknin
    So the request should be like this?
    Thanks!
     
    from boxsdk import JWTAuth
    import requests
    import json
    from boxsdk import Client
     
    config = JWTAuth.from_settings_file("<file_path>\\config.json")
    client = Client(config)
     
    users = client.users(user_type='managed')
    for user in users:
      if user.status == 'inactive':
        print('User Login: {1}'.format(user.login))
    0
    Comment actions Permalink

Please sign in to leave a comment.