You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Mandark's avatar
Mandark
New member | Level 2
5 years ago

[Python SDK]sharing_list_shared_links for deleted users?

I'm attemping to enumerate all shared links within a business dropbox account as part of an audit. The most effective method I've found so far is using the dropbox.DropboxTeam.as_user().sharing_list_shared_links method to enumerate all links created by a given user. Unfortunately this returns an AuthError('invalid_select_user', None) when attempting to run on deleted accounts. Is there a way to run sharing_list_shared_links with admin credentials and see ALL accounts shared links, or a way to resolve this AuthError? App is scoped using Team Member File Access and works great for users that haven't been deleted, but this does not show links that have been created by accounts that are now deleted. Relevant code below:

 

def find_shared_links(dbxTeam: dropbox.DropboxTeam):
all_links = []
members = dbxTeam.team_members_list(include_removed=True)
for member in members.members:
print(member)
try:
member_links = dbxTeam.as_user(member.profile.team_member_id).sharing_list_shared_links(None)
except AuthError as e:
print(e, 'ERROR OCCURS ON DELETED ACCOUNTS HERE')
all_links.append(member_links)
return all_links

 

  • No, unfortunately there isn't a way to work around this or perform these calls for deleted team members, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    No, unfortunately there isn't a way to work around this or perform these calls for deleted team members, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 

    • Mandark's avatar
      Mandark
      New member | Level 2

      Thanks for the reply Greg. Would love to see that as a feature going forward, as links don't seem to disappear when you delete an account in our testing. Not a big issue for my client since they are a small company, but it would be nice to be able to audit those older links for larger enterprises.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,889 PostsLatest Activity: 4 hours ago
327 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!