Accessing Accounts and Identities
This chapter describes how to get information about Groove accounts and identities.
The GrooveAccounts service provides information about all the accounts on the local Groove device. The GrooveAccounts service provides the starting point for hierarchal access to all Groove Web Services available on the device.
You can access account information using the GrooveAccounts.Read2 operation. For each account on the device, the GrooveAccounts.Read2 operation provides:
Account URL
Account Name
For each Identity in the account: IdentityURL, Identity Name, and Spaces Web Service URI
Contacts Web Service URI
Messages Web Service URI
There are no events provided by the GrooveAccounts service.
The GrooveAccounts service can be successfully executed even when there are no Groove users logged on. Most other Groove Web Service operations require that you specify an IdentityURL from an account and that a user must be logged on that account for the call to succeed.
The following example code demonstrates how to read the accounts.
// Create the GrooveAccounts service
GrooveAccounts.GrooveAccounts accountsSvc = new GrooveAccounts.GrooveAccounts();
accountsSvc.GrooveRequestHeaderValue = new GrooveAccounts.GrooveRequestHeader();
accountsSvc.GrooveRequestHeaderValue.GrooveRequestKey = ...;
string HTTPAddressAndPort = ...;
// see examples in Reading Groove Registry Keys
accountsSvc.Url = HTTPAddressAndPort + "/GWS/Groove/2.0/Accounts/";
// Read the accounts
GrooveAccounts.Account2 [] accounts2 = accountsSvc.Read2();
for (int i = 0; i < accounts2.Length; i++)
{
GrooveAccounts.Account2 act2 = accounts2[i];
string accountName = act2.Name;
string accountURI = act2.URI;
string contactsURI = act2.Contacts;
string messagesURI = act2.Messages;
for (int j = 0; j < act2.Identities.Length; j++)
{
GrooveAccounts.Identity2 ident2 = act2.Identities[j];
string identityName = ident2.Name;
string identityURL = ident2.URI;
string spacesURI = ident2.Spaces;
}
}