< Back

New-AzureRmApiManagementAuthorizationServer

Tue Jan 29, 2019 9:29 pm

NAME New-AzureRmApiManagementAuthorizationServer



SYNOPSIS

Creates an authorization server.





SYNTAX

New-AzureRmApiManagementAuthorizationServer -AccessTokenSendingMethods {AuthorizationHeader | Query} -AuthorizationEndpointUrl <String>

[-AuthorizationRequestMethods {Get | Post}] -ClientAuthenticationMethods {Basic | Body} -ClientId <String> -ClientRegistrationPageUrl <String>

[-ClientSecret <String>] -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>] [-DefaultScope <String>] [-Description

<String>] -GrantTypes {AuthorizationCode | Implicit | ResourceOwnerPassword | ClientCredentials} -Name <String> [-ResourceOwnerPassword <String>]

[-ResourceOwnerUsername <String>] [-ServerId <String>] [-SupportState <Boolean>] [-TokenBodyParameters <Hashtable>] -TokenEndpointUrl <String>

[<CommonParameters>]





DESCRIPTION

The New-AzureRmApiManagementAuthorizationServer cmdlet creates an Azure API Management authorization server.





PARAMETERS

-AccessTokenSendingMethods <PsApiManagementAccessTokenSendingMethod[]>

Specifies an array of methods to send an access token. psdx_paramvalues AuthorizationHeader and Query.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-AuthorizationEndpointUrl <String>

Specifies the authorization endpoint to authenticate resource owners and obtain authorization grants.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-AuthorizationRequestMethods <PsApiManagementAuthorizationRequestMethod[]>

Specifies an array of authorization request methods. Valid values are: GET, POST. The default value is GET.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ClientAuthenticationMethods <PsApiManagementClientAuthenticationMethod[]>

Specifies an array of client authentication methods. psdx_paramvalues Basic and Body.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ClientId <String>

Specifies the client ID of the developer console that is the client application.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ClientRegistrationPageUrl <String>

Specifies the client registration endpoint to register clients with the authorization server and obtain client credentials.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ClientSecret <String>

Specifies the client secret of developer console that is the client application.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Context <PsApiManagementContext>

Specifies a PsApiManagementContext object.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DefaultScope <String>

Specifies the default scope for the authorization server.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Description <String>

Specifies a description for an authorization server.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-GrantTypes <PsApiManagementGrantType[]>

Specifies an array of grant types. psdx_paramvalues



- AuthorizationCode



- ClientCredentials



- Implicit



- ResourceOwnerPassword



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Name <String>

Specifies the name of the authorization server to create.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceOwnerPassword <String>

Specifies the resource owner password. You must specify this parameter is required if ResourceOwnerPassword is specified by the GrantTypes

parameter.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceOwnerUsername <String>

Specifies the resource owner user name. You must specify this parameter if ResourceOwnerPassword is specified by the GrantTypes parameter.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ServerId <String>

Specifies the ID of the authorization server to create.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SupportState <Boolean>

Indicates whether to support the State parameter.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TokenBodyParameters <Hashtable>

Specifies additional body parameters using application/x-www-form-urlencoded format.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TokenEndpointUrl <String>

Specifies the token endpoint URL that is used by clients to obtain access tokens in exchange for presenting authorization grants or refresh

tokens.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

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 (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementOAuth2AuthrozationServer







NOTES









Example 1: Create an authorization server



PS C:\\>$ApiMgmtContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"

PS C:\\>New-AzureRmApiManagementAuthrizarionServer -Context $ApiMgmtContext -Name "Contoso OAuth2 server" -ClientRegistrationPageUrl

"https://contoso/signup" -AuthorizationEndpointUrl "https://contoso/auth" -TokenEndpointUrl "https://contoso/token" -ClientId "clientid"

-ClientSecret "e041ed1b660b4eadbad5a29d066e6e88" -AuthorizationRequestMethods @('Get', 'Post') -GrantTypes @( 'AuthorizationCode', 'Implicit',

'ResourceOwnerPassword', 'ClientCredentials') -ClientAuthenticationMethods @('Basic') -TokenBodyParameters @{'par1'='val1'; 'par2'='val2'}

-AccessTokenSendingMethods @('AuthorizationHeader', 'Query') -ResourceOwnerUsername "ivan" -ResourceOwnerPassword "qwerty"



This command creates an authorization server.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... tionserver