英文:
Exporting List of SAML Users in an Organization
问题
我是GitHub组织的所有者。
在组织的成员选项卡中,使用导出下拉菜单,我可以手动下载组织用户列表,其中包括我正在寻找的saml_name_id。
是否有API或其他非手动方法可以获取此列表?
API 获取用户 仅提供公开信息,对于组织所有者来说几乎没有用处。
英文:
I am an Owner in my GitHub Organization.
In the Organization's People tab, using the Export pull-down menu, I can manually download the list of the Organization's users which includes their saml_name_id that I am looking for.
Is there an API or any other non-manual method to obtain this list?
API Get a user provides only publicized information which is pretty useless for an Org. Owner.
答案1
得分: 1
这里是已翻译的内容:
"Until I stumble on it, here is what I found and used: https://gist.github.com/gbaman/b3137e18c739e0cf98539bf4ec4366ad. It uses GitHub's GraphQL."
英文:
There might be an elusive GitHub API which does the job.
Until I stumble on it, here is what I found and used:
https://gist.github.com/gbaman/b3137e18c739e0cf98539bf4ec4366ad.
It uses GitHub's GraphQL.
答案2
得分: 0
根据官方文档,您可以使用 https://api.github.com/orgs/{org}/members
获取组织用户列表。要使用API,您需要生成个人访问令牌(PAT)。您可以通过转到您的 GitHub
设置页面,然后点击“个人访问令牌”选项卡来完成此操作。
生成了您的PAT后,您需要将其包含在请求的Authorization标头中。Authorization标头应具有以下格式:
Authorization: Bearer {your-pat}
英文:
As per official documentation you can use https://api.github.com/orgs/{org}/members
to obtain the list of organization users. To use the API, you will need to generate a personal access token (PAT). You can do this by going to your GitHub
settings page and clicking on the "Personal access tokens" tab.
Once you have generated your PAT, you will need to include it in the Authorization header of your request. The Authorization header should be in the following format:
Authorization: Bearer {your-pat}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论