在没有域管理员启用API访问的情况下,如何访问域上的用户信息? [英] How can I access user info on a domain without the domain administrator enabling API access?

本文介绍了在没有域管理员启用API访问的情况下,如何访问域上的用户信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个在Google Marketplace中列出的应用程序.我正在尝试让我的应用使用Directory API(属于Admin SDK的一部分).根据此处的文档: https://developers.google.com/admin -sdk/directory/v1/guides/前提条件,这将要求安装我的应用程序的任何人启用API访问权限.

I have written an application that I have listed in the Google Marketplace. I am trying to get my app to use the Directory API (part of the Admin SDK). According to the documentation here: https://developers.google.com/admin-sdk/directory/v1/guides/prerequisites, this will require anyone who installs my app to enable API access.

我唯一需要的范围是:

https://www.googleapis.com/auth/admin.directory.user.readonly

是否有任何方法可以访问上述范围而无需启用API访问权限?我最终要做的就是将用户从域导入到我的应用程序中,这样他们就不必访问我的应用程序即可拥有一个帐户.

Is there any way to access the above scope without requiring API access to be enabled? All I am ultimately trying to do is import users from a domain into my app so that they do not have to visit my app to have an account.

我试图避免让域管理员启用API访问.我还看到其他需要与我的似乎完全相同的作用域且无需API访问权限的应用程序.我愿意退回到旧的,已过时的Google Data API,但我认为我什至不能注册一个应用程序来使用它们.

I am trying to avoid having to have the domain administrator enable API access. I have also seen other apps that require the same exact scope as I do that seem to work without requiring API access. I'd be willing to drop back to the older, deprecated Google Data APIs, but I don't think I can even register an app to use them.

推荐答案

今天这不可能.您在自己的应用中有一些指导,可以提醒管理员将其打开.

This is not possible today. You have you have guidance in your app to remind the admin to turn this on.

我们了解到,对于管理员(期望对应用进行授权应该给予其访问权限)和开发人员(需要编写不必要的代码来处理),这都不是最佳选择.我们正在研究改善这种流程,但尚未制定具体的启动计划.

We understand this is suboptimal for both admins (expecting that authorizing an app should give it access) and developers (needing to write unnecessary code to handle this). We are looking into improving this flow but not specific plans on launch yet.

这篇关于在没有域管理员启用API访问的情况下,如何访问域上的用户信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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