Prevent Private emails in our organization? Possible ?

Hi Team,

We have a private company, and recently noticed that there are a few users that using their personal accounts on our git.
Is there a way to locate all the users email address or at least the users that are not in our domain?

1 Like

You don’t have access to any user private information including private emails.

If you want to restrict what email domains can be used in relation to your organization, you will need to own a company domain and emails for that domain and have a GitHub Enterprise Cloud plan there is an option
You can then enable restricting-email-notifications-for-your-organization
You can use GraphQL to list member and any verified email addresses they have

1 Like

Other things to consider:

  1. GitHub uses a user account to connect to both open source and organizational repositories. For Enterprise Cloud you can use Enforcing SAML single sign-on for your organization - GitHub Docs to ensure users who connect to the Organization repositories to read or write data must also authenticate with your organizations identity provider in addition to the normal signin
  2. If you want no personal GitHub accounts to login (even with SSO) then I would looks at About Enterprise Managed Users - GitHub Docs (EMUs) Note that this can’t be enabled for an existing organization account so either SSO above or the comment by @byrneh may suit your needs better to avoid migration of your repositories. Users would get a new identity such as yourcompany_login to do their work with.