microsoftgraph / microsoftgraph/msgraph-sdk-powershell
Get-MgGroupMember doesn't return service principals as group members
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 898
- Fork
- 230
- Merge medio
- 2g 5h
- PR unite (30g)
- 31
Descrizione
Describe the bug
I was trying to list all members (users, nested groups, devices, service principals) of certain Entra ID groups, using Get-MgGroupMember cmdlet. I found that in a list of groups I was interested in I found only one user, but in fact there was a user and service principal.
I checked another group that has SPs as group members only and Get-MgGroupMember showed that it is empty.
Expected behavior
According to the cmdlet synopsis, Get-MgGroupMember should do following:
Get a list of the group's direct members.
A group can have users, organizational contacts, devices, service principals and other groups as members.
But in fact it doesn't display SPs.
How to reproduce
- Create an Entra ID group with a service principal member.
- Execute Get-MgGroupMember -GroupId $GroupId.
- Observe missing SP id in the output.
SDK Version
2.20.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
- OS: Windows 11
- OS Build: 22H2 22621.3737
- Arch: x64
- PSVersion: 5.1.22621.3672
### Other information
_No response_
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con il cmdlet Get-MgGroupMember e riproduci il problema usando un gruppo Entra ID contenente un service principal, come descritto nel report in tre passaggi. Confronta l'output del comando con i membri diretti effettivi del gruppo. Il lavoro è completato quando gli ID dei service principal compaiono insieme a utenti, gruppi annidati e dispositivi, senza ometterli.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- powershell
- Ambito
- api
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100