Set-AzureRmApiManagementAuthorizationServer
Modifies an authorization server.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Set-AzureRmApiManagementAuthorizationServer
-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-AzureRmApiManagementAuthorizationServer cmdlet modifies Azure API Management authorization server details.
Examples
Example 1: Modify an authorization server
PS C:\>$ApiMgmtContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>Set-AzureRmApiManagementAuthrizarionServer -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.
Parameters
-AccessTokenSendingMethods
Specifies an array of methods to send an access token. psdx_paramvalues AuthorizationHeader and Query.
Type: | PsApiManagementAccessTokenSendingMethod[] |
Accepted values: | AuthorizationHeader, Query |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AuthorizationEndpointUrl
Specifies the authorization endpoint to authenticate resource owners and obtain authorization grants.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AuthorizationRequestMethods
Specifies an array of authorization request methods. psdx_paramvalues GET and POST. The default value is GET.
Type: | PsApiManagementAuthorizationRequestMethod[] |
Accepted values: | Get, Post, Head, Options, Trace, Put, Patch, Delete |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ClientAuthenticationMethods
Specifies an array of client authentication methods. psdx_paramvalues Basic and Body.
Type: | PsApiManagementClientAuthenticationMethod[] |
Accepted values: | Basic, Body |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ClientId
Specifies the client ID of the developer console that is the client application.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ClientRegistrationPageUrl
Specifies the client registration endpoint to register clients with the authorization server and obtain client credentials.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ClientSecret
Specifies the client secret of the developer console that is the client application.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Context
Specifies a PsApiManagementContext object.
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: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultScope
Specifies the default scope for the authorization server.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Description
Specifies a description for an authorization server.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-GrantTypes
Specifies an array of grant types. psdx_paramvalues
- AuthorizationCode
- ClientCredentials
- Implicit
- ResourceOwnerPassword
Type: | PsApiManagementGrantType[] |
Accepted values: | AuthorizationCode, Implicit, ResourceOwnerPassword, ClientCredentials |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the name of the authorization server to modify.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PassThru
passthru
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceOwnerPassword
Specifies the resource owner password. You must specify this parameter if ResourceOwnerPassword is specified by the GrantTypes parameter.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceOwnerUsername
Specifies the resource owner user name. You must specify this parameter if ResourceOwnerPassword is specified by the GrantTypes parameter.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServerId
Specifies the ID of the authorization server to modify.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SupportState
Indicates whether to support the State parameter.
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TokenBodyParameters
Specifies additional body parameters using application/x-www-form-urlencoded format.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TokenEndpointUrl
Specifies the token endpoint for clients to obtain access tokens in exchange for presenting authorization grants or refresh tokens.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
PsApiManagementAuthorizationRequestMethod[]
PsApiManagementClientAuthenticationMethod[]
Nullable<T>[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
PsApiManagementAccessTokenSendingMethod[]
Outputs
PsApiManagementOAuth2AuthrozationServer