< Back

Get-OktaGroup

Sat Jan 18, 2020 5:46 pm

NAME Get-OktaGroup



SYNOPSIS

Gets one or more Okta groups.





SYNTAX

Get-OktaGroup -All [<CommonParameters>]



Get-OktaGroup -Filter <String> [<CommonParameters>]



Get-OktaGroup [-Identity] <String> [<CommonParameters>]



Get-OktaGroup -User <User> [<CommonParameters>]



Get-OktaGroup -App <Application> [<CommonParameters>]





DESCRIPTION

Gets one or more Okta groups by specifying the group Id, or searches based on a filter string.





PARAMETERS

-All [<SwitchParameter>]

Will return all groups in the Okta org.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Filter <String>

Specifies a filter string to return a subset of groups.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Identity <String>

Specifies the Id of the group.



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-User <User>

Specifies a user to return group membership for.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-App <Application>

Specifies an Okta app, and will return all groups assigned to that app.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Okta.Sdk.User







OUTPUTS

Okta.Sdk.Group







NOTES









-------------------------- Example 1 --------------------------



PS C:\\> Get-OktaGroup -Identity "00gb3syzldEpE5JNj0h7"



Get a single group by its Id property.

-------------------------- Example 2 --------------------------



PS C:\\> Get-OktaGroup -All



Get all the groups in your Okta org.

-------------------------- Example 3 --------------------------



PS C:\\> Get-OktaGroup -Filter 'type eq "OKTA_GROUP"'



Get any groups of type OKTA_GROUP by specifying a filter string.

-------------------------- Example 4 --------------------------



PS C:\\> Get-OktaUser -Identity "matt" | Get-OktaGroup



Get groups with user matt as a member.

-------------------------- Example 5 --------------------------



PS C:\\> Get-OktaApp -Identity "00hh2hjrlgEpE5JNj8h9" | Get-OktaGroup



Get groups assigned to a particular application.



RELATED LINKS

Groups https://developer.okta.com/docs/reference/api/groups