BOX Windows SDK c# Getting A Users ID
Hi, first post so please be kind... I'm building a Windows BOX App using the Windows SDK in C#. I'm trying to add a user who I know has a BOX account to a folder but I'm unable to get their User ID.
My code: [i'm just trying to write their details to a richtextbox for testing]
BoxCollection workusers = await client.UsersManager.GetEnterpriseUsersAsync("***email address removed for privacy***");
foreach (BoxUser workUser in workusers.Entries)
{
rtbMe.Text += workUser.Name.ToString() + Environment.NewLine + workUser.Login.ToString() + Environment.NewLine + workUser.Id.ToString();
}
{
rtbMe.Text += workUser.Name.ToString() + Environment.NewLine + workUser.Login.ToString() + Environment.NewLine + workUser.Id.ToString();
}
This doesn't return anything. Is it possible to find any BOX User by typing their email address?
If I hard-code their User ID when giving folder permissions it adds them okay, but I need a way to query an email address to return their User ID rather than going to the web and manually noting it down..
Please help!
Thanks,
Gareth
Please sign in to leave a comment.
Comments
3 comments