我试图使用directoryapi创建组和邮件列表,但似乎有什么问题。我使用了Python Quickstart中的代码,它工作得很好。但是,当我试图将作用域更改为:https://www.googleapis.com/auth/admin.directory.group.member
以便创建或访问组时,我遇到了以下错误:
https://www.googleapis.com/admin/directory/v1/users?customer=my_customer&orderBy=email&alt=json&maxResults=10 returned "Insufficient Permission: Request had insufficient authentication scopes.">
你知道我怎么解决这个问题吗?在
获取用户列表,如
您需要
admin.directory.user
作用域。 如果要列出用户,则需要在SCOPES
列表中包含正确的范围。如果不这样做,删除这行应该可以修复这个错误。不过,示例的其余部分确实依赖于这一行。在相关问题 更多 >
编程相关推荐