I'm using Laravel Socialite to handle logging in with Google. In response I can see the user's domain. I was wondering if there was also a way to get an organization id that's user belongs to.
Asked
Active
Viewed 1,126 times
0
-
Are you saving the user once he logs in for the first time in your database? – Mihir Bhende Feb 20 '19 at 21:23
2 Answers
1
I was wondering if there was also a way to get an organization id that's user belongs to.
No. The only information that you have access to is stored in the Access Token and ID Token. The exception being if the Access Token also provides API access (privileges) to GCP or G Suite.
John Hanley
- 74,467
- 6
- 95
- 159
0
You'll need to request additional scopes to find the organization ID [1].
[1] https://cloud.google.com/resource-manager/reference/rest/v1/organizations/search
user2705223
- 1,219
- 6
- 10
-
Note that requesting scopes for Google Cloud Platform will get your application approval denied unless Google approves your business requirements for this scope. – John Hanley Feb 22 '19 at 01:07
-
Is theere any other way to find this info since google does not approve this scope besides for service accounts? – MatejDodevski Oct 19 '22 at 10:50