- 21 Aug 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Get-MSAzureUserGroupMembership
- Updated on 21 Aug 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Return the groups that a user is a member of from Azure AD.
Syntax
Get-MSAzureUserGroupMembership
-ID <String>
-Transitive
-Properties <String>
-Filter <String>
-TenantName <String>
-TotalCount
-HideProgressBar
-AuthToken <String>
-ResultSize <Int32>
-ProgressUpdateFreq <Int32>
Examples
Example 1
Get-MSAzureUserGroupMembership -ID abcdefab-1234-1234-1234-abcdabcdabcd
Returns the groups that the selected user is a member of
Example 2
Get-MSAzureUser -Properties 'id,userPrincipalName' -AuthToken $AuthToken
Returns a list of Azure users' ID and userPrincipalNames using a previously-obtained authtoken
Parameters
-ID <String>
The Azure AD GUID of the user
Parameter | Value |
---|---|
Required | true |
Position | 1 |
Required | true |
Default Value | None |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
-Transitive <SwitchParameter>
Show groups where the user is a member of a group that is a member of another group
Parameter | Value |
---|---|
Required | false |
Position | named |
Required | false |
Default Value | False |
Accept pipeline input? | false |
Accept wildcard characters? | false |
-Properties <String>
A comma-delimited list of properties to return in the results
Format as per https://docs.microsoft.com/en-us/graph/query-parameters?view=graph-rest-1.0#select-parameter
Available properties can be found at https://docs.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#properties
Parameter | Value |
---|---|
Required | false |
Position | 2 |
Required | false |
Default Value | None |
Accept pipeline input? | false |
Accept wildcard characters? | false |
-Filter <String>
Add filter parameters as per https://docs.microsoft.com/en-us/graph/query-parameters?context=graph%2Fapi%2F1.0&view=graph-rest-1.0#filter-parameter
Available properties can be found at https://docs.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#properties
Parameter | Value |
---|---|
Required | false |
Position | 3 |
Required | false |
Default Value | None |
Accept pipeline input? | false |
Accept wildcard characters? | false |
-TenantName <String>
The name of the Nectar DXP tenant. Used in multi-tenant configurations.
Parameter | Value |
---|---|
Required | false |
Position | 4 |
Required | false |
Default Value | None |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
-TotalCount <SwitchParameter>
Only return a total count of objects
Parameter | Value |
---|---|
Required | false |
Position | named |
Required | false |
Default Value | False |
Accept pipeline input? | false |
Accept wildcard characters? | false |
-HideProgressBar <SwitchParameter>
Parameter | Value |
---|---|
Required | false |
Position | named |
Required | false |
Default Value | False |
Accept pipeline input? | false |
Accept wildcard characters? | false |
-AuthToken <String>
The authorization token used for this request. Normally obtained via Get-MSGraphAccessToken
Parameter | Value |
---|---|
Required | false |
Position | 5 |
Required | false |
Default Value | None |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
-ResultSize <Int32>
The number of results to return. Defaults to 10000.
Parameter | Value |
---|---|
Required | false |
Position | 6 |
Required | false |
Default Value | 10000 |
Accept pipeline input? | false |
Accept wildcard characters? | false |
-ProgressUpdateFreq <Int32>
Parameter | Value |
---|---|
Required | false |
Position | 7 |
Required | false |
Default Value | 1 |
Accept pipeline input? | false |
Accept wildcard characters? | false |