Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groups.memberships.list always returning null for membership type #24950

Open
asharpe-sc opened this issue Jan 16, 2025 · 0 comments
Open

groups.memberships.list always returning null for membership type #24950

asharpe-sc opened this issue Jan 16, 2025 · 0 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@asharpe-sc
Copy link

TL;DR:
this is an issue specifically with the java client. calling cloudIdentity.groups().memberships().list(<insert group name>) returns a Membership[]. but the issue is that for each Membership in this array, the "type" field is always null. however, if i make a call to this API via the command line with gcloud this is not an issue.

Environment details

  1. API: cloud identity java client, version: v1-rev20241208-2.0.0 (but even other versions produce this issue)
  2. OS type and version: using MacOS sonoma
  3. Java version:
~ % java -version
openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Zulu21.36+17-CA (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Zulu21.36+17-CA (build 21.0.4+7-LTS, mixed mode, sharing)

Steps to reproduce

  1. try to list the memberships of a group through the java client
  2. print out the membership objects, and you will see that the "type" is always null

Code example

List<Membership> memberships = cloudIdentity.groups().memberships().list(<insert group name>).execute().getMemberships();
for (Membership membership : memberships) {
System.out.println(membership)
// you will see here that "type"is always null, instead of being populated with say "USER", "SERVICE ACCOUNT", "GROUP", etc.       
}

External references such as API reference guides

https://cloud.google.com/identity/docs/reference/rest/v1/groups.memberships/list

Additional info

note that if you try to call this API via the command line with gcloud, there are no issues - i see the "type" field being populated perfectly fine which makes me think this is an issue only with the java client.

@diegomarquezp diegomarquezp added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants