通过Google Apps脚本获取谷歌应用程序域电子表格上的所有用户信息 [英] Through Google Apps Script get all user information on a spreadsheet of a google apps domain

查看:102
本文介绍了通过Google Apps脚本获取谷歌应用程序域电子表格上的所有用户信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在电子表格中检索我的域的所有用户数据,到目前为止,我能够在下次登录时检索名字电子邮件ID姓氏,存储配额和密码更改。但是我无法获取详细信息如启用的应用程序,许可证,联系人共享,电子邮件路由 - Google Apps电子邮件,电子邮件路由 - 继承路线,移动设备,日期快照,日期更改,更改注释,完成的操作等
我基本上无法得到任何API这一切我得到一些JSON或XML代码,但如果我完全希望它只在GAS没有其他文件。

解决方案

通过 Admin SDK 。您可能还想更详细地查看其他Google数据API,您可以汇总一些优秀的报告工具。

许多API都可以在Google Apps脚本中使用通过使用UrlFetch服务。在该服务中构建的OAuth流程对于OAuth 1流程非常有用,并且创建体面的 Google OAuth 2 flow 与UrlFetch。

然后您可以对这些API进行身份验证请求,并使用Apps脚本处理相应的响应。


I want to retrieve all the user data of my domain in a spreadsheet, so far i am able to retrieve first name email id last name ,storage quota and password change when next time i log in. But I am unable to get details like Apps enabled,License,Contact Sharing,Email Routing - Google Apps Email,Email Routing - Inherit routes , Mobile Devices,Date Snapshot,Date Change,Change Comment,Action done by etc. I am basically not able to get any API for this all i am getting some JSON or XML codes but what if i entirely want it in GAS only no other files.

解决方案

Some of what you are looking for is best requested via the Admin SDK. You may want to also check out other Google Data APIs in more detail, you could put together some good reporting tools.

Many of the APIs can be used in Google Apps Script by using the UrlFetch service. There's an OAuth flow built in that service that is quite nice for OAuth 1 flows, and it's not too bad to create a decent Google OAuth 2 flow with UrlFetch as well.

Then you can make authenticated requests to those APIs and handle the responses accordingly with Apps Script.

这篇关于通过Google Apps脚本获取谷歌应用程序域电子表格上的所有用户信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆