Set-AzApiManagementAuthorizationServer
Modifies an authorization server.
Syntax
Default (Default)
Set-AzApiManagementAuthorizationServer
-Context <PsApiManagementContext>
-ServerId <String>
-Name <String>
[-Description <String>]
-ClientRegistrationPageUrl <String>
-AuthorizationEndpointUrl <String>
-TokenEndpointUrl <String>
-ClientId <String>
[-ClientSecret <String>]
[-AuthorizationRequestMethods <PsApiManagementAuthorizationRequestMethod[]>]
-GrantTypes <PsApiManagementGrantType[]>
-ClientAuthenticationMethods <PsApiManagementClientAuthenticationMethod[]>
[-TokenBodyParameters <Hashtable>]
[-SupportState <Boolean>]
[-DefaultScope <String>]
-AccessTokenSendingMethods <PsApiManagementAccessTokenSendingMethod[]>
[-ResourceOwnerUsername <String>]
[-ResourceOwnerPassword <String>]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzApiManagementAuthorizationServer cmdlet modifies Azure API Management authorization server details.
Examples
Example 1: Modify an authorization server
$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Set-AzApiManagementAuthorizationServer -Context $ApiMgmtContext -ServerId 0123456789 -Name "Contoso OAuth2 server" -ClientRegistrationPageUrl "https://contoso/signupv2" -AuthorizationEndpointUrl "https://contoso/authv2" -TokenEndpointUrl "https://contoso/tokenv2" -ClientId "clientid" -ClientSecret "e041ed1b660b4eadbad5a29d066e6e88" -AuthorizationRequestMethods @('Get') -GrantTypes @( 'AuthorizationCode', 'Implicit', 'ClientCredentials') -ClientAuthenticationMethods @('Basic') -TokenBodyParameters @{'par1'='val1'} -AccessTokenSendingMethods @('AuthorizationHeader')
This command modifies the specified API Management authorization server.
Example 2
Modifies an authorization server. (autogenerated)
Set-AzApiManagementAuthorizationServer -AccessTokenSendingMethods AuthorizationHeader -AuthorizationEndpointUrl 'https://contoso/authv2' -AuthorizationRequestMethods Get -ClientAuthenticationMethods Basic -ClientId 'clientid' -ClientRegistrationPageUrl 'https://contoso/signupv2' -ClientSecret '0000000000000000000000000000000000000' -Context <PsApiManagementContext> -DefaultScope <String> -GrantTypes AuthorizationCode -Name 'Contoso OAuth2 server' -ServerId 0123456789 -TokenEndpointUrl 'https://contoso/tokenv2'
Parameters
-AccessTokenSendingMethods
Specifies an array of methods to send an access token.
psdx_paramvalues AuthorizationHeader and Query.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-AuthorizationEndpointUrl
Specifies the authorization endpoint to authenticate resource owners and obtain authorization grants.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-AuthorizationRequestMethods
Specifies an array of authorization request methods.
psdx_paramvalues GET and POST.
The default value is GET.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ClientAuthenticationMethods
Specifies an array of client authentication methods.
psdx_paramvalues Basic and Body.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ClientId
Specifies the client ID of the developer console that is the client application.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ClientRegistrationPageUrl
Specifies the client registration endpoint to register clients with the authorization server and obtain client credentials.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ClientSecret
Specifies the client secret of the developer console that is the client application.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Context
Specifies a PsApiManagementContext object.
Parameter properties
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
-DefaultScope
Specifies the default scope for the authorization server.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Description
Specifies a description for an authorization server.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-GrantTypes
Specifies an array of grant types.
psdx_paramvalues
AuthorizationCode
ClientCredentials
Implicit
ResourceOwnerPassword
Parameter properties
Type: PsApiManagementGrantType [ ]
Default value: None
Accepted values: AuthorizationCode, Implicit, ResourceOwnerPassword, ClientCredentials
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Name
Specifies the name of the authorization server to modify.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-PassThru
passthru
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceOwnerPassword
Specifies the resource owner password.
You must specify this parameter if ResourceOwnerPassword is specified by the GrantTypes parameter.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceOwnerUsername
Specifies the resource owner user name.
You must specify this parameter if ResourceOwnerPassword is specified by the GrantTypes parameter.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ServerId
Specifies the ID of the authorization server to modify.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-SupportState
Indicates whether to support the State parameter.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-TokenBodyParameters
Specifies additional body parameters using application/x-www-form-urlencoded format.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-TokenEndpointUrl
Specifies the token endpoint for clients to obtain access tokens in exchange for presenting authorization grants or refresh tokens.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
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 .
Outputs