Hello @Greg-DB
We have developed a migration app that one of our customers used for migration files from Windows to Dropbox.
The migration worked fine except that the files were migrated in a different folder from the one selected by customer.
I then read Dropbox Team Files Guide: https://developers.dropbox.com/dbx-team-files-guide
Dropbox for Business Account we used for dev testing is set up as Team Folder Configuration where RootNameSpaceId and HomeNameSpaceId are same and so we did not face issue during migration. However, our customer Dropbox for Business Account is set us as Team Spaces where RootNameSpaceId and HomeNameSpaceId are different. This seems to be the most probable reason for files being migrated to a different folder for our customer.
We need to ensure that our application should be able to migrate files for both the Dropbox for Business configurations i.e. Team Space as well as Team Folder configuration.
I found out that we can use either RootNamespaceId or HomeNamespaceId as per the code snippet below:
DropboxApi.Users.FullAccount acc = await clientadmin.Users.GetCurrentAccountAsync();
string rootnamespace = "";
if (acc != null && acc.RootInfo != null && acc.RootInfo.RootNamespaceId != null)
{
rootnamespace = acc.RootInfo.RootNamespaceId;
//rootnamespace = acc.RootInfo.HomeNamespaceId;
}
clientadmin = clientadmin.WithPathRoot(new PathRoot.NamespaceId(rootnamespace));
Which one is used by default if we don't set WithPathRoot - RootNameSpaceID or HomeNameSpaceID ?
From what I understand, we need to use HomeNameSpaceID if we need to create files and folders via Dropbox APIs in user's personal folders and RootNameSpaceID if we we want to create files and folders in user's team folders. Is that correct ?
Please confirm which NameSpaceID to use in our case where we want to create file in User 's own personal folder for both Team space and Team folder Dropbox Business configurations?
Thanks,
Gagan