How to get GitHub App installation ID for a user

Hi there,

I have recently created a GitHub App, and I’m having issues understanding how to get installation IDs for a user.

I have a Web App. I want a user to be able to click a button, and then either install the GitHub App on his GitHub organization, or pick one of his existing organizations that already have the GitHub App installed.
At the end of that flow, I want to have the installation ID, either from a new installation or from an existing one.

For a new installation, simply going to the URL handles that and gives back the installation ID.
Is there something similar for an existing installation?