I'm setting up an application that supports OpenID Connect authentication, using my G-Suite domain to support single sign-on. To set up per-user permissions, I need to map the OIDC subject to the app's internal user ID. In Google's OIDC implementation, the subject is a numeric user ID that remains the same even if a user is renamed. Google recommends using it instead of the email address to identify users.
In the G-Suite admin console, it is very easy to get a list of all my domain's users and their email addresses, but I don't see any way to get a bulk listing of everyone's user IDs. It isn't included in the downloadable list of user data from the Users page of the admin console, even when the option to include all available columns is selected.
What's the best way to get a list of all my users' Google user IDs?