0

I using google admin sdk to get all users from domain. Below is my code

Directory.Users.List list = directoryService.users().list();
   list.setCustomer("my_customer");
   list.setPageToken(nextToken);
   list.setMaxResults(500);
   Users users = list.execute(); 

I found one issue today. It is not retrieving newly created users only. I created one new user on domain and checked immediate. Above code didn't retrieve newly created user.It retrieve all old users but not new one. I checked on Admin sdk browser, there it shows all users with newly created also.I am sure that it was retrieving all with new users before but unable to get what is happening now ? Is there any changes need to do now for retrieving all users with new one.?

RBP
  • 481
  • 1
  • 9
  • 29
  • Above code didn't retrieve the user at all or is it taking some time to see the new costumer on the list?? – SGC Jan 28 '15 at 17:14
  • Previously it was retrieving all users with newly created. Now it is retrieving not all users. It is retrieving only old users not newly created users. Suppose there are 30 users on domain , I created 2 new users on domain. Then above code retrieving only 30 users. – RBP Jan 29 '15 at 04:30
  • When i login to newly created account's then above code retrieve all users with new users also. why it is require to login new user's account then It retrieves all users along with new also? – RBP Jan 29 '15 at 06:33
  • 1
    Try to add: `list.setQuery(null)`, which should get all the users, newly created and older ones. – cjlallana Feb 03 '15 at 12:48

0 Answers0