Generating a Personal Access Token
Create a classic Personal Access Token from your GitHub account. To list every licensed user in a GitHub Enterprise Cloud enterprise, create it as an enterprise owner, because GitHub Apps cannot read the enterprise’s users. An enterprise owner must also own an organization to read its members, teams and settings, and does not see an organization they are not a member of.
Name the token and set an expiration
Sign in to your GitHub account, then open Settings > Developer settings > Personal access tokens > Tokens (classic). With Enterprise Managed Users, use a managed enterprise owner (username ending in _<shortcode>).
- Click Generate new token.
- Select Generate new token (classic).
- Note:
StackOne Integration - Expiration: a period that fits your rotation policy
Select scopes for access reviews and compliance checks
read:org lists members and teams, two-factor status when the token’s user owns the organization, and the organization audit log for an owner. admin:org adds pending invitations, the organization’s two-factor requirement and organization rulesets. repo reads private repositories, pull requests, reviews, branch protection and collaborators. read:audit_log reads the enterprise audit log for an enterprise owner.
Add scopes for an enterprise
For an enterprise, select read:enterprise, which lists the enterprise’s licensed users, and each scope listed. When you also list single organizations, admin:org adds all their pending invitations.
Add scopes for other actions
Add only the scopes your actions need. If you selected repo, it already includes public_repo, repo_deployment and security_events.
Generate the token
Scroll to the bottom of the form.
- Click Generate token.
Copy the token
GitHub shows the new token on the page that opens.
- Copy the Personal Access Token across. GitHub shows it only once.
Authorize the token for single sign-on
If your organization or enterprise uses SAML or OIDC single sign-on, including Enterprise Managed Users, authorize the token for it.
- Next to the token, click Configure SSO.
- Click Authorize next to your enterprise or each organization.
Find your organization ID
The Organization ID is the organization name in your organization’s address on GitHub.
- Format:
https://github.com/<organization ID> - Example: if the organization’s address is
https://github.com/acme-engineering, the organization ID isacme-engineering
Find your enterprise slug
The Enterprise slug is the last part of your enterprise’s address.
- Format:
https://github.com/enterprises/<enterprise slug> - Example: if the enterprise’s address is
https://github.com/enterprises/acme, the enterprise slug isacme - A user appears once they sign in or join an organization. Enterprise members who never signed in and belong to no organization are not listed.
- Someone whose only tie is a pending organization invitation shows as pending.
What GitHub reports for managed users
With Enterprise Managed Users, GitHub does not report two-factor status or email addresses, because sign-in and email are managed in your identity provider.
Link the Account
Connect
- Click Connect.
- If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
- Once authorization is successful, you will see a confirmation popup.
Use Actions
Next Steps
Webhooks setup
Configure receiving Events for GitHub into StackOne.