Get-AzApiManagementUser
Gets a user or users.
Syntax
GeAllUsers (Default)
Get-AzApiManagementUser
-Context <PsApiManagementContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByUserId
Get-AzApiManagementUser
-Context <PsApiManagementContext>
[-UserId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByUser
Get-AzApiManagementUser
-Context <PsApiManagementContext>
[-FirstName <String>]
[-LastName <String>]
[-State <PsApiManagementUserState>]
[-Email <String>]
[-GroupId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzApiManagementUser cmdlet gets a specified user, or all users, if no user is specified.
Examples
Example 1: Get all users
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementUser -Context $apimContext
This command gets all users.
Example 2: Get a user by ID
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementUser -Context $apimContext -UserId "0123456789"
This command gets a user by ID.
Example 3: Get users by last name
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementUser -Context $apimContext -LastName "Fuller"
This command gets users that have a specified last name, Fuller.
Example 4: Get a user by email address
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementUser -Context $apimContext -Email "[email protected]"
This command gets the user that has the specified email address.
Example 5: Get all users within a group
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementUser -Context $apimContext -GroupId "0001"
This command gets all users within the specified group.
Parameters
-Context
Specifies an instance of PsApiManagementContext.
Parameter properties
Type: | PsApiManagementContext |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
Type: | IAzureContextContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
Specifies the email address of the user. If this parameter is specified, this cmdlet finds a user by email. This parameter is optional.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetByUser
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-FirstName
Specifies the first name of the user. If this parameter is specified, this cmdlet finds a user by first name. This parameter is optional.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetByUser
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-GroupId
Specifies the group identifier. If specified, this cmdlet finds all users within the specified group. This parameter is optional.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetByUser
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-LastName
Specifies the last name of a user. If specified, this cmdlet finds users by last name. This parameter is optional.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetByUser
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-State
Specifies the user state. If specified, this cmdlet finds users in this state. This parameter is optional.
Parameter properties
Type: | |
Default value: | None |
Accepted values: | Active, Blocked, Deleted, Pending |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetByUser
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-UserId
Specifies a user ID. If specified, this cmdlet finds the user by this identifier. This parameter is optional.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetByUserId
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.