0

I have a Github App and I would like to look up a Github User. We have our organization connected to our corporate Azure AD.

Is it possible to find a Github User based on an ObjectId or UPN from AzureAD?

I've tried this API https://docs.github.com/en/rest/reference/scim#get-scim-provisioning-information-for-a-user and gave my app "read-only on members" (https://docs.github.com/en/rest/overview/permissions-required-for-github-apps#permission-on-members), but it doesn't show anything.

Any suggestions?

Thanks!

Casper Jensen
  • 551
  • 1
  • 5
  • 15
  • I've tried `/scim/v2/organizations/MYORG/Users` but it gives me "403 Resource not accessible by integration". Which permission is needed? – Casper Jensen Apr 02 '22 at 20:34

1 Answers1

0

Typically the AAD ObjectId would map to SCIM externalId. If GitHub supports it, GET /Users?filter=externalId eq "ObjectIDValue" or GET /Users?filter=userName eq "user@domain.com"

Zollnerd
  • 725
  • 4
  • 5
  • Thanks for the feedback, but it doesn't seems to work. Can you give a better example – Casper Jensen Apr 02 '22 at 20:32
  • If it doesn't work because of the permissions related stuff you mentioned above, that's something I'm not familiar with. I provided the filters you'd use in a SCIM GET call. If you're getting the "403 Resource not accessible by integration" - that sounds like you may not be able to manage that user via SCIM? Probably worth opening a support case with GitHub to understand what is possible and what permissions are required. – Zollnerd Apr 04 '22 at 15:15