I would like to add user groups membership information to JWT token generated from Identity Aware Proxy.
We could handle this by calling Directory API from our applications after getting user identifier by decoding JWT token, but we need to configure Service Account with GSuite Domain Delegation and then manually configure GSuite Security to allow this account to call Directory API.
I don't want to perform all these steps for all my applications, and ideally, I would like to avoid implementing an Authorization Server when IAP looks to have access to all data I need.
Ideally, we would like to add group membership (GSuite information) to JWT token generated from IAP and let our application get Groups by decoding the token.
Do you think it is possible ? If not, what is the best way to retrieve user group membership by using IAP ?
Thank you :)