cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We want to make our Community work for you and we need your help. Take our short survey!
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[Python SDK]sharing_list_shared_links for deleted users?

Highlighted

[Python SDK]sharing_list_shared_links for deleted users?

New member | Level 2
New member | Level 2

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

 

1 Accepted Solution

Accepted Solutions
Highlighted

Re: [Python SDK]sharing_list_shared_links for deleted users?

Dropboxer
Dropboxer

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. 

View solution in original post

2 Replies 2
Highlighted

Re: [Python SDK]sharing_list_shared_links for deleted users?

Dropboxer
Dropboxer

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. 

View solution in original post

Highlighted

Re: [Python SDK]sharing_list_shared_links for deleted users?

New member | Level 2
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.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?