1. My goal is to get all Information about Users, Groups, Group Memberships, Permissions to Documents, Sites. Additionally, I want to audit all user activities.
2. Al lthese information i need to get by using 2 legged oauth mechanism.
3. I am doing the following today to get User data. However I am not able to get anything other than First name and last name. I am getting The Email address by appending the domain name to the Login name. Here is the Java code.
GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters();
oauthParameters.setOAuthConsumerKey("domain.com");
oauthParameters.setOAuthConsumerSecret("MySecretKey");
oauthParameters.setOAuthType(OAuthType.TWO_LEGGED_OAUTH);
OAuthHmacSha1Signer signer = new OAuthHmacSha1Signer();
URL feedUrl = new URL("https://apps-apis.google.com/a/feeds/" + "domain.com" + "/user/2.0");
UserService service = new UserService("ProvisiongApiClient");
service.setOAuthCredentials(oauthParameters, signer);
service.useSsl();
UserFeed resultFeed = service.getFeed(feedUrl, UserFeed.class);
int i=0;
for (UserEntry entry : resultFeed.getEntries()) {
Login login = entry.getLogin();
Name name = entry.getSelf().getName();
Quota quota = entry.getQuota();
String email = login.getUserName() + "@" + "
domain.com" ;
System.out.println( email + "," + name.getGivenName() + "," + name.getFamilyName()); // email, first name, last name
i++;
}
4. How do i get the supervisor, department, business unit, etc from the Provisioning API
5. Can you please help me with issues in (3)?
6. Is my approach correct?
7. How do I get the Documents and sites metadata using 2 legged oauth?
Thanks in advance ..