How do I know all the organizations that a Github user owns? - github

I'm stuck with a requirement wherein I need to figure out how many and which organizations a user owns in Github.
I've tried the users API, but that only returns the organizations that the user is a member of.
Any help is much appreciated.
TIA

Related

Github API - how can I get a list of users assigned individual rights to a repo

I have a repo in GitHub and I'm trying to get a handle on what permissions have been assigned to it. I am admin on the repo.
When I call gh api "https://api.github.com/repos/:org/:repo/teams" it returns the teams which have been assigned roles. Win!
However I know that some people have direct permissions applied to their users, not through a team. I want to see who these people are but can't find out how to do so through the API. I have nearly 300 repos to check so don't want to do it manually.
I know I could look through the contributors but my whole company has read rights to the repo so it's like to be hundreds of people and that sounds painful.
Is there a more direct way that I'm missing?

How can I remove a user from an Organization?

I am able to add users (emails) to a given organization. However, I don't seem to find a way to remove a user from an organization.
Am I missing something?
Thanks in advance
It's not a feature that is public available atm. But something we are working on.
If you have a user you want to have removed from your org, write to us at support#toit.io or via the chat on our webpage.
Sorry for the inconveniences.

Obtain User Access Metrics in Azure DevOps

Good morning;
I'd like to know if it's possible to make a query in Azure DevOps for obtaining the team's users accesses stats.
I can obtain the cards modified by the users, but i want to know if there's a way to know if the users are accessing to the boards (using Azure devops queries).
Thanks!!
Do you mean to get users list who are accessing boards?
If so, I am afraid that there is no way to get this information right now.
This feature is not supported by azure devops for the time being.
You could add your request for this feature on our UserVoice site , which is our main forum for product suggestions. After suggest raised, you can vote and add your comments for this feedback. The product team would provide the updates if they view it.
Thank you for your response.
As you said, I need the list of the users who are accessing boards.
By the moment, I'll obtain the number of cards modified by each user, and this could give me an idea about the users activity.

Automatic invites to your github organisation

At the moment for a Github organisation of mine, potential members have to be manually searched for an added. Is there way a to make your Github Organization public, so people can easily and automagically join your cause?
I am a beginner with Github, but have searched a lot and they don't seem to have this feature. Is it a plugin anywhere?
I see 2 problems, either of which would be nice to fix.
Why can't users request an invite to your organisation, even if you have to manually approve?
Why can't I send out bulk invites to say an email list? Or can I do this?
Thanks Stack Overflow
I don't know why Github doesn't offer anything like this functionality. Github Organisations seem still kind of underdone, and I look forward to them making them more useful. For the moment I have something which can help you with one of your problems.
Second Problem: Bulk Invites
After needing bulk invite students for a university club I am a part of, I created thundergolfer/automated-github-organisation-invites. It's a Heroku deploy-able web app that allows anyone with access to the URL to get themselves an organisation invite automatically.
It uses the Github API to do basically what you need. You can send out a bulk email with a link to the web app. Job Done.
First Problem: Users requesting invites
The problem with the above solution is that you don't get a chance to review who requests an invite. They are automatically added. Perhaps when I get time in the future I can extend the project above to allow you to capture requests and then review them before sending out the email.
I am not sure about the first point. But the second point should be no problem. You can use the GitHub API to invite members to your organisation. You can read more about it here:
https://developer.github.com/v3/orgs/members/#add-a-member
If using GitHub classroom then you can solve both problems. In the classroom you can add multiple email invites at the same time (or link with a LMS to get the list of people to invite automatically, both are explained here). You can also create an assignment and end up with a link that can be sent to people to join. Within an assignment there can be auto Team and Repo creation.
With your second problem another option is a python script that can bulk invite users to a GitHub organisation:
https://github.com/RobbyJ/github_batch_organisation_invite

GitHub Enterprise Admin Function - Add Arbitrary User to Organization

Is it possible in GitHub enterprise to arbitrarily add a user to an organization if you are a site administrator. I am evaluating the software, but cannot seem to do this reliably. A site admin who is not themselves part of an organization cannot pull up the organizations dashboard, nor see which users are part of it, although they can view and contribute to the repositories within (in a round about way). I know that it is possible to impersonate a non-admin user, but you would have to know who already is a part of that organization to do this, which is hidden. There has to be a better way because what if some nefarious employee and removed everyone but themselves. The organization would effectively be orphaned.
Thank you
I think I have found where all the members are, under "Members & Teams", duh. I can usurp their account and make myself an owner if needed. Seems cumbersome though.
You most likely want ghe-org-admin-promote