Get the documents list of a domain user

If you are the administrator of a Google Apps Account, then you can get the document list of a domain user. There is no direct interface to do this, but Docs List API allows you.


Here is short Google Apps Script code which will get the document list of your domain user.

// To run this function, you must have administrator priviledge in your domain

// user = ''

//This function will return document ID, Document Title of all the documents

function getDocuments(user){

  var scope = '';


  var fetchArgs = googleOAuth_('docs', scope);

  var url = scope + user+'/private/full?v=3&alt=json';

  var urlFetch = UrlFetchApp.fetch(url, fetchArgs);

  var json = Utilities.jsonParse(urlFetch.getContentText());

  var entry = json.feed.entry;

  var docs = [];

  for(var i in entry){

    var tempDoc = {};

    for(var j in entry[i]){ = entry[i].id.$t.split('%3A')[1];

      tempDoc.title = entry[i].title.$t;




  return docs;



//Google oAuth

//Used by getDocuments(user)

function googleOAuth_(name,scope) {

  var oAuthConfig = UrlFetchApp.addOAuthService(name);






  return {oAuthServiceName:name, oAuthUseToken:"always"};