Modifier

Partager via


Get-AzApiManagementAuthorizationServer

Gets an API Management authorization server.

Syntax

Get-AzApiManagementAuthorizationServer
   -Context <PsApiManagementContext>
   [-ServerId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzApiManagementAuthorizationServer
   [-ServerId <String>]
   -ResourceId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzApiManagementAuthorizationServer cmdlet gets all Azure API Management authorization servers or specified authorization server. ClientSecret will not be included into result details. To get client secret, use Get-AzApiManagementAuthorizationServerClientSecret.

Examples

Example 1: Get all authorization servers

$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementAuthorizationServer -Context $ApiMgmtContext

This command gets all API Management authorization servers.

Example 2: Get a specified authorization server

$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementAuthorizationServer -Context $ApiMgmtContext -ServerId "0123456789"

This command gets the specified authorization server.

Parameters

-Context

Type:PsApiManagementContext
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

Arm Resource Identifier of the authorization server. If specified will try to find authorization server by the identifier. This parameter is required.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ServerId

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

PsApiManagementContext

String

Outputs

PsApiManagementOAuth2AuthorizationServer