Azure / Azure/azure-libraries-for-java
Exception when calling graph-rbac API
- Lingua principale
- Java
- Stelle
- 97
- Fork
- 102
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I use below code get user's group by his object id.
```
UserGetMemberGroupsParametersInner parametersInner = new UserGetMemberGroupsParametersInner()
.withAdditionalProperties(Collections.emptyMap())
.withSecurityEnabledOnly(false);
List groups = azure.activeDirectoryUsers().inner().getMemberGroups(oid, parametersInner);
```
But it throws errors like:
```
com.microsoft.azure.management.graphrbac.GraphErrorException: Status code 400, {"odata.error":
{"code":"Request_BadRequest","message":{"lang":"en","value":"The parameter 'additionalProperties' in
the request payload is not a valid parameter for the function import
'getMemberGroups'."},"requestId":"...","date":"2018-09-18T04:15:00"}}
```
It seems its additionalProperties cannot be empty. But I have no idea where to get the definition for the parameters. I only find Azure Rest API with 1.6 version and it is outdated which does not have this parameters. How to set this parameter?
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start at the UserGetMemberGroupsParametersInner construction and the azure.activeDirectoryUsers().inner().getMemberGroups(oid, parametersInner) call. Inspect the generated request payload and compare it with the Graph RBAC getMemberGroups API definition, focusing on why additionalProperties is serialized. Done means the request no longer sends an invalid parameter and the user's groups can be retrieved successfully.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, java
- Ambito
- api, cloud
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100