Hello @Greg-DB
We are using the GetCurrentAccountAsync API to determine whether a team member uses Team Space, and to obtain their RootNamespaceId and HomeNamespaceId values.
Below is the relevant code snippet:
string appkey = ConfigurationManager.AppSettings["DropboxAppKeyBiz"];
string appsecret = ConfigurationManager.AppSettings["DropboxAppSecretBiz"];
DropboxTeamClient teamclient = new DropboxTeamClient(refreshtoken, appkey, appsecret);
if (teammemberid != null)
{
DropboxClient clientadmin = teamclient.AsAdmin(teammemberid);
Api.Users.FullAccount acc = await clientadmin.Users.GetCurrentAccountAsync();
if (acc != null && acc.RootInfo != null)
{
rootnamespaceid = acc.RootInfo.RootNamespaceId;
homenamespaceid = acc.RootInfo.HomeNamespaceId;
if (acc.RootInfo.IsTeam == true)
{
IsTeamSpace = true;
homepath = acc.RootInfo.AsTeam.HomePath;
}
else
{
IsTeamSpace = false;
}
}
}
We have 14 users in this Dropbox Business team ( 13 team members + 1 team admin ).
Folder listing and namespace retrieval works correctly for the team admin and only one team member.
For the remaining 12 team members, the operation fails at Users.GetCurrentAccountAsync()
Could you please help clarify:
- Why is GetCurrentAccountAsync succeeding for only a few accounts and failing for most of the team members?
- Under what conditions does GetCurrentAccountAsync fail when used via the Business API with teamClient.AsAdmin(teamMemberId)?
- What is the correct supported method to reliably retrieve RootNamespaceId, HomeNamespaceId, Team Space configuration ?
All calls are made via a valid Dropbox Business app using Team Admin impersonation (AsAdmin).
Only the above endpoint is failing for most members; other Team API calls (MembersGetInfo, folder listing for admin, etc.) work correctly.
Thank you,
Gagan