swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Use these REST APIs for managing OAuth2 servers configuration in your Azure API Management deployment. OAuth 2.0 can be used to authorize developer accounts for Azure API Management. For more information refer to [How to OAuth2](https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-oauth2).
  title: ApiManagementClient
  version: 2019-01-01
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2019-01-01/apimauthorizationservers.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: apimanagement-apimauthorizationservers
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow.
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters: {}
paths:
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers":
    get:
      description: Lists a collection of authorization servers defined within a service instance.
      operationId: AuthorizationServer_ListByService
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: "|   Field     |     Usage     |     Supported operators     |     Supported functions     |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | </br>"
          in: query
          name: $filter
          required: false
          type: string
        - description: Number of records to return.
          format: int32
          in: query
          minimum: 1
          name: $top
          required: false
          type: integer
          x-ms-parameter-location: method
        - description: Number of records to skip.
          format: int32
          in: query
          minimum: 0
          name: $skip
          required: false
          type: integer
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: A Collection of the Authorization Server entities for the specified API Management service instance.
          schema:
            description: Paged OAuth2 Authorization Servers list representation.
            properties:
              count:
                description: Total record count number across all pages.
                format: int64
                type: integer
              nextLink:
                description: Next page link if any.
                type: string
              value:
                description: Page values.
                items:
                  allOf:
                    - description: The Resource definition.
                      properties:
                        id:
                          description: Resource ID.
                          readOnly: true
                          type: string
                        name:
                          description: Resource name.
                          readOnly: true
                          type: string
                        type:
                          description: Resource type for API Management resource.
                          readOnly: true
                          type: string
                      x-ms-azure-resource: true
                  description: External OAuth authorization server settings.
                  properties:
                    properties:
                      allOf:
                        - description: External OAuth authorization server Update settings contract.
                          properties:
                            authorizationMethods:
                              description: HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
                              items:
                                enum:
                                  - HEAD
                                  - OPTIONS
                                  - TRACE
                                  - GET
                                  - POST
                                  - PUT
                                  - PATCH
                                  - DELETE
                                type: string
                                x-ms-enum:
                                  modelAsString: false
                                  name: AuthorizationMethod
                              type: array
                            bearerTokenSendingMethods:
                              description: "Specifies the mechanism by which access token is passed to the API. "
                              externalDocs:
                                url: http://tools.ietf.org/html/rfc6749#section-4
                              items:
                                enum:
                                  - authorizationHeader
                                  - query
                                type: string
                                x-ms-enum:
                                  modelAsString: true
                                  name: BearerTokenSendingMethod
                              type: array
                            clientAuthenticationMethod:
                              description: Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
                              items:
                                enum:
                                  - Basic
                                  - Body
                                type: string
                                x-ms-enum:
                                  modelAsString: true
                                  name: ClientAuthenticationMethod
                                  values:
                                    - description: Basic Client Authentication method.
                                      value: Basic
                                    - description: Body based Authentication method.
                                      value: Body
                              type: array
                            clientSecret:
                              description: Client or app secret registered with this authorization server.
                              type: string
                            defaultScope:
                              description: Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
                              externalDocs:
                                url: http://tools.ietf.org/html/rfc6749#section-3.3
                              type: string
                            description:
                              description: Description of the authorization server. Can contain HTML formatting tags.
                              type: string
                            resourceOwnerPassword:
                              description: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
                              type: string
                            resourceOwnerUsername:
                              description: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
                              type: string
                            supportState:
                              description: If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
                              externalDocs:
                                url: http://tools.ietf.org/html/rfc6749#section-3.1
                              type: boolean
                            tokenBodyParameters:
                              description: 'Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.'
                              items:
                                description: OAuth acquire token request body parameter (www-url-form-encoded).
                                properties:
                                  name:
                                    description: body parameter name.
                                    type: string
                                  value:
                                    description: body parameter value.
                                    type: string
                                required:
                                  - name
                                  - value
                              type: array
                            tokenEndpoint:
                              description: OAuth token endpoint. Contains absolute URI to entity being referenced.
                              externalDocs:
                                url: http://tools.ietf.org/html/rfc6749#section-3.1
                              type: string
                      description: External OAuth authorization server settings Properties.
                      properties:
                        authorizationEndpoint:
                          description: OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
                          type: string
                        clientId:
                          description: Client or app id registered with this authorization server.
                          type: string
                        clientRegistrationEndpoint:
                          description: Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
                          type: string
                        displayName:
                          description: User-friendly authorization server name.
                          maxLength: 50
                          minLength: 1
                          type: string
                        grantTypes:
                          description: Form of an authorization grant, which the client uses to request the access token.
                          externalDocs:
                            url: http://tools.ietf.org/html/rfc6749#section-4
                          items:
                            enum:
                              - authorizationCode
                              - implicit
                              - resourceOwnerPassword
                              - clientCredentials
                            type: string
                            x-ms-enum:
                              modelAsString: true
                              name: GrantType
                              values:
                                - description: Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1.
                                  value: authorizationCode
                                - description: Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2.
                                  value: implicit
                                - description: Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3.
                                  value: resourceOwnerPassword
                                - description: Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4.
                                  value: clientCredentials
                          type: array
                      required:
                        - displayName
                        - clientRegistrationEndpoint
                        - authorizationEndpoint
                        - clientId
                        - grantTypes
                type: array
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - AuthorizationServer
      x-ms-examples:
        ApiManagementListAuthorizationServers:
          parameters:
            api-version: 2019-01-01
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                nextLink: ""
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer
                    name: newauthServer
                    properties:
                      authorizationEndpoint: https://www.contoso.com/oauth2/auth
                      authorizationMethods:
                        - GET
                      bearerTokenSendingMethods:
                        - authorizationHeader
                      clientId: "1"
                      clientRegistrationEndpoint: https://www.contoso.com/apps
                      clientSecret: "2"
                      defaultScope: read write
                      description: test server
                      displayName: test2
                      grantTypes:
                        - authorizationCode
                        - implicit
                      resourceOwnerPassword: pwd
                      resourceOwnerUsername: un
                      supportState: true
                      tokenEndpoint: https://www.contoso.com/oauth2/token
                    type: Microsoft.ApiManagement/service/authorizationServers
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer2
                    name: newauthServer2
                    properties:
                      authorizationEndpoint: https://www.contoso.com/oauth2/auth
                      authorizationMethods:
                        - GET
                      bearerTokenSendingMethods:
                        - authorizationHeader
                      clientAuthenticationMethod:
                        - Basic
                      clientId: "1"
                      clientRegistrationEndpoint: https://www.contoso.com/apps
                      clientSecret: "2"
                      defaultScope: read write
                      description: test server
                      displayName: test3
                      grantTypes:
                        - authorizationCode
                        - implicit
                      resourceOwnerPassword: pwd
                      resourceOwnerUsername: un
                      supportState: true
                      tokenEndpoint: https://www.contoso.com/oauth2/token
                    type: Microsoft.ApiManagement/service/authorizationServers
      x-ms-odata: ./definitions.json#/definitions/AuthorizationServerContract
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}":
    delete:
      description: Deletes specific authorization server instance.
      operationId: AuthorizationServer_Delete
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Identifier of the authorization server.
          in: path
          maxLength: 80
          minLength: 1
          name: authsid
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
          in: header
          name: If-Match
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: The authorization server settings were successfully deleted.
        "204":
          description: The authorization server settings were successfully deleted.
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - AuthorizationServer
      x-ms-examples:
        ApiManagementDeleteAuthorizationServer:
          parameters:
            If-Match: "*"
            api-version: 2019-01-01
            authsid: newauthServer2
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200": {}
            "204": {}
    get:
      description: Gets the details of the authorization server specified by its identifier.
      operationId: AuthorizationServer_Get
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Identifier of the authorization server.
          in: path
          maxLength: 80
          minLength: 1
          name: authsid
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: Gets the details of the specified authorization server.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: External OAuth authorization server settings.
            properties:
              properties:
                allOf:
                  - description: External OAuth authorization server Update settings contract.
                    properties:
                      authorizationMethods:
                        description: HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
                        items:
                          enum:
                            - HEAD
                            - OPTIONS
                            - TRACE
                            - GET
                            - POST
                            - PUT
                            - PATCH
                            - DELETE
                          type: string
                          x-ms-enum:
                            modelAsString: false
                            name: AuthorizationMethod
                        type: array
                      bearerTokenSendingMethods:
                        description: "Specifies the mechanism by which access token is passed to the API. "
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-4
                        items:
                          enum:
                            - authorizationHeader
                            - query
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: BearerTokenSendingMethod
                        type: array
                      clientAuthenticationMethod:
                        description: Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
                        items:
                          enum:
                            - Basic
                            - Body
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: ClientAuthenticationMethod
                            values:
                              - description: Basic Client Authentication method.
                                value: Basic
                              - description: Body based Authentication method.
                                value: Body
                        type: array
                      clientSecret:
                        description: Client or app secret registered with this authorization server.
                        type: string
                      defaultScope:
                        description: Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.3
                        type: string
                      description:
                        description: Description of the authorization server. Can contain HTML formatting tags.
                        type: string
                      resourceOwnerPassword:
                        description: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
                        type: string
                      resourceOwnerUsername:
                        description: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
                        type: string
                      supportState:
                        description: If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.1
                        type: boolean
                      tokenBodyParameters:
                        description: 'Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.'
                        items:
                          description: OAuth acquire token request body parameter (www-url-form-encoded).
                          properties:
                            name:
                              description: body parameter name.
                              type: string
                            value:
                              description: body parameter value.
                              type: string
                          required:
                            - name
                            - value
                        type: array
                      tokenEndpoint:
                        description: OAuth token endpoint. Contains absolute URI to entity being referenced.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.1
                        type: string
                description: External OAuth authorization server settings Properties.
                properties:
                  authorizationEndpoint:
                    description: OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
                    type: string
                  clientId:
                    description: Client or app id registered with this authorization server.
                    type: string
                  clientRegistrationEndpoint:
                    description: Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
                    type: string
                  displayName:
                    description: User-friendly authorization server name.
                    maxLength: 50
                    minLength: 1
                    type: string
                  grantTypes:
                    description: Form of an authorization grant, which the client uses to request the access token.
                    externalDocs:
                      url: http://tools.ietf.org/html/rfc6749#section-4
                    items:
                      enum:
                        - authorizationCode
                        - implicit
                        - resourceOwnerPassword
                        - clientCredentials
                      type: string
                      x-ms-enum:
                        modelAsString: true
                        name: GrantType
                        values:
                          - description: Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1.
                            value: authorizationCode
                          - description: Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2.
                            value: implicit
                          - description: Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3.
                            value: resourceOwnerPassword
                          - description: Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4.
                            value: clientCredentials
                    type: array
                required:
                  - displayName
                  - clientRegistrationEndpoint
                  - authorizationEndpoint
                  - clientId
                  - grantTypes
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - AuthorizationServer
      x-ms-examples:
        ApiManagementGetAuthorizationServer:
          parameters:
            api-version: 2019-01-01
            authsid: newauthServer2
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer2
                name: newauthServer2
                properties:
                  authorizationEndpoint: https://www.contoso.com/oauth2/auth
                  authorizationMethods:
                    - GET
                  bearerTokenSendingMethods:
                    - authorizationHeader
                  clientAuthenticationMethod:
                    - Basic
                  clientId: "1"
                  clientRegistrationEndpoint: https://www.contoso.com/apps
                  clientSecret: "2"
                  defaultScope: read write
                  description: test server
                  displayName: test3
                  grantTypes:
                    - authorizationCode
                    - implicit
                  resourceOwnerPassword: pwd
                  resourceOwnerUsername: un
                  supportState: true
                  tokenEndpoint: https://www.contoso.com/oauth2/token
                type: Microsoft.ApiManagement/service/authorizationServers
    head:
      description: Gets the entity state (Etag) version of the authorizationServer specified by its identifier.
      operationId: AuthorizationServer_GetEntityTag
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Identifier of the authorization server.
          in: path
          maxLength: 80
          minLength: 1
          name: authsid
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: Specified authorization server entity exists and current entity state version is present in the ETag header.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - AuthorizationServer
      x-ms-examples:
        ApiManagementHeadAuthorizationServer:
          parameters:
            api-version: 2019-01-01
            authsid: newauthServer2
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              headers:
                etag: AAAAAAAAAAa=
    patch:
      description: Updates the details of the authorization server specified by its identifier.
      operationId: AuthorizationServer_Update
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Identifier of the authorization server.
          in: path
          maxLength: 80
          minLength: 1
          name: authsid
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: OAuth2 Server settings Update parameters.
          in: body
          name: parameters
          required: true
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: External OAuth authorization server settings.
            properties:
              properties:
                allOf:
                  - description: External OAuth authorization server Update settings contract.
                    properties:
                      authorizationMethods:
                        description: HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
                        items:
                          enum:
                            - HEAD
                            - OPTIONS
                            - TRACE
                            - GET
                            - POST
                            - PUT
                            - PATCH
                            - DELETE
                          type: string
                          x-ms-enum:
                            modelAsString: false
                            name: AuthorizationMethod
                        type: array
                      bearerTokenSendingMethods:
                        description: "Specifies the mechanism by which access token is passed to the API. "
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-4
                        items:
                          enum:
                            - authorizationHeader
                            - query
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: BearerTokenSendingMethod
                        type: array
                      clientAuthenticationMethod:
                        description: Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
                        items:
                          enum:
                            - Basic
                            - Body
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: ClientAuthenticationMethod
                            values:
                              - description: Basic Client Authentication method.
                                value: Basic
                              - description: Body based Authentication method.
                                value: Body
                        type: array
                      clientSecret:
                        description: Client or app secret registered with this authorization server.
                        type: string
                      defaultScope:
                        description: Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.3
                        type: string
                      description:
                        description: Description of the authorization server. Can contain HTML formatting tags.
                        type: string
                      resourceOwnerPassword:
                        description: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
                        type: string
                      resourceOwnerUsername:
                        description: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
                        type: string
                      supportState:
                        description: If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.1
                        type: boolean
                      tokenBodyParameters:
                        description: 'Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.'
                        items:
                          description: OAuth acquire token request body parameter (www-url-form-encoded).
                          properties:
                            name:
                              description: body parameter name.
                              type: string
                            value:
                              description: body parameter value.
                              type: string
                          required:
                            - name
                            - value
                        type: array
                      tokenEndpoint:
                        description: OAuth token endpoint. Contains absolute URI to entity being referenced.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.1
                        type: string
                description: External OAuth authorization server Update settings contract.
                properties:
                  authorizationEndpoint:
                    description: OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
                    type: string
                  clientId:
                    description: Client or app id registered with this authorization server.
                    type: string
                  clientRegistrationEndpoint:
                    description: Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
                    type: string
                  displayName:
                    description: User-friendly authorization server name.
                    maxLength: 50
                    minLength: 1
                    type: string
                  grantTypes:
                    description: Form of an authorization grant, which the client uses to request the access token.
                    externalDocs:
                      url: http://tools.ietf.org/html/rfc6749#section-4
                    items:
                      enum:
                        - authorizationCode
                        - implicit
                        - resourceOwnerPassword
                        - clientCredentials
                      type: string
                      x-ms-enum:
                        modelAsString: true
                        name: GrantType
                        values:
                          - description: Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1.
                            value: authorizationCode
                          - description: Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2.
                            value: implicit
                          - description: Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3.
                            value: resourceOwnerPassword
                          - description: Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4.
                            value: clientCredentials
                    type: array
        - description: ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
          in: header
          name: If-Match
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "204":
          description: The authorization server settings were successfully updated.
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - AuthorizationServer
      x-ms-examples:
        ApiManagementUpdateAuthorizationServer:
          parameters:
            If-Match: "*"
            api-version: 2019-01-01
            authsid: newauthServer
            parameters:
              properties:
                clientId: update
                clientSecret: updated
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "204": {}
    put:
      description: Creates new authorization server or updates an existing authorization server.
      operationId: AuthorizationServer_CreateOrUpdate
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Identifier of the authorization server.
          in: path
          maxLength: 80
          minLength: 1
          name: authsid
          pattern: ^[^*#&+:<>?]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Create or update parameters.
          in: body
          name: parameters
          required: true
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: External OAuth authorization server settings.
            properties:
              properties:
                allOf:
                  - description: External OAuth authorization server Update settings contract.
                    properties:
                      authorizationMethods:
                        description: HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
                        items:
                          enum:
                            - HEAD
                            - OPTIONS
                            - TRACE
                            - GET
                            - POST
                            - PUT
                            - PATCH
                            - DELETE
                          type: string
                          x-ms-enum:
                            modelAsString: false
                            name: AuthorizationMethod
                        type: array
                      bearerTokenSendingMethods:
                        description: "Specifies the mechanism by which access token is passed to the API. "
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-4
                        items:
                          enum:
                            - authorizationHeader
                            - query
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: BearerTokenSendingMethod
                        type: array
                      clientAuthenticationMethod:
                        description: Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
                        items:
                          enum:
                            - Basic
                            - Body
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: ClientAuthenticationMethod
                            values:
                              - description: Basic Client Authentication method.
                                value: Basic
                              - description: Body based Authentication method.
                                value: Body
                        type: array
                      clientSecret:
                        description: Client or app secret registered with this authorization server.
                        type: string
                      defaultScope:
                        description: Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.3
                        type: string
                      description:
                        description: Description of the authorization server. Can contain HTML formatting tags.
                        type: string
                      resourceOwnerPassword:
                        description: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
                        type: string
                      resourceOwnerUsername:
                        description: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
                        type: string
                      supportState:
                        description: If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.1
                        type: boolean
                      tokenBodyParameters:
                        description: 'Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.'
                        items:
                          description: OAuth acquire token request body parameter (www-url-form-encoded).
                          properties:
                            name:
                              description: body parameter name.
                              type: string
                            value:
                              description: body parameter value.
                              type: string
                          required:
                            - name
                            - value
                        type: array
                      tokenEndpoint:
                        description: OAuth token endpoint. Contains absolute URI to entity being referenced.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.1
                        type: string
                description: External OAuth authorization server settings Properties.
                properties:
                  authorizationEndpoint:
                    description: OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
                    type: string
                  clientId:
                    description: Client or app id registered with this authorization server.
                    type: string
                  clientRegistrationEndpoint:
                    description: Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
                    type: string
                  displayName:
                    description: User-friendly authorization server name.
                    maxLength: 50
                    minLength: 1
                    type: string
                  grantTypes:
                    description: Form of an authorization grant, which the client uses to request the access token.
                    externalDocs:
                      url: http://tools.ietf.org/html/rfc6749#section-4
                    items:
                      enum:
                        - authorizationCode
                        - implicit
                        - resourceOwnerPassword
                        - clientCredentials
                      type: string
                      x-ms-enum:
                        modelAsString: true
                        name: GrantType
                        values:
                          - description: Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1.
                            value: authorizationCode
                          - description: Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2.
                            value: implicit
                          - description: Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3.
                            value: resourceOwnerPassword
                          - description: Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4.
                            value: clientCredentials
                    type: array
                required:
                  - displayName
                  - clientRegistrationEndpoint
                  - authorizationEndpoint
                  - clientId
                  - grantTypes
        - description: ETag of the Entity. Not required when creating an entity, but required when updating an entity.
          in: header
          name: If-Match
          required: false
          type: string
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: Authorization server is already registered.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: External OAuth authorization server settings.
            properties:
              properties:
                allOf:
                  - description: External OAuth authorization server Update settings contract.
                    properties:
                      authorizationMethods:
                        description: HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
                        items:
                          enum:
                            - HEAD
                            - OPTIONS
                            - TRACE
                            - GET
                            - POST
                            - PUT
                            - PATCH
                            - DELETE
                          type: string
                          x-ms-enum:
                            modelAsString: false
                            name: AuthorizationMethod
                        type: array
                      bearerTokenSendingMethods:
                        description: "Specifies the mechanism by which access token is passed to the API. "
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-4
                        items:
                          enum:
                            - authorizationHeader
                            - query
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: BearerTokenSendingMethod
                        type: array
                      clientAuthenticationMethod:
                        description: Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
                        items:
                          enum:
                            - Basic
                            - Body
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: ClientAuthenticationMethod
                            values:
                              - description: Basic Client Authentication method.
                                value: Basic
                              - description: Body based Authentication method.
                                value: Body
                        type: array
                      clientSecret:
                        description: Client or app secret registered with this authorization server.
                        type: string
                      defaultScope:
                        description: Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.3
                        type: string
                      description:
                        description: Description of the authorization server. Can contain HTML formatting tags.
                        type: string
                      resourceOwnerPassword:
                        description: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
                        type: string
                      resourceOwnerUsername:
                        description: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
                        type: string
                      supportState:
                        description: If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.1
                        type: boolean
                      tokenBodyParameters:
                        description: 'Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.'
                        items:
                          description: OAuth acquire token request body parameter (www-url-form-encoded).
                          properties:
                            name:
                              description: body parameter name.
                              type: string
                            value:
                              description: body parameter value.
                              type: string
                          required:
                            - name
                            - value
                        type: array
                      tokenEndpoint:
                        description: OAuth token endpoint. Contains absolute URI to entity being referenced.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.1
                        type: string
                description: External OAuth authorization server settings Properties.
                properties:
                  authorizationEndpoint:
                    description: OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
                    type: string
                  clientId:
                    description: Client or app id registered with this authorization server.
                    type: string
                  clientRegistrationEndpoint:
                    description: Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
                    type: string
                  displayName:
                    description: User-friendly authorization server name.
                    maxLength: 50
                    minLength: 1
                    type: string
                  grantTypes:
                    description: Form of an authorization grant, which the client uses to request the access token.
                    externalDocs:
                      url: http://tools.ietf.org/html/rfc6749#section-4
                    items:
                      enum:
                        - authorizationCode
                        - implicit
                        - resourceOwnerPassword
                        - clientCredentials
                      type: string
                      x-ms-enum:
                        modelAsString: true
                        name: GrantType
                        values:
                          - description: Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1.
                            value: authorizationCode
                          - description: Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2.
                            value: implicit
                          - description: Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3.
                            value: resourceOwnerPassword
                          - description: Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4.
                            value: clientCredentials
                    type: array
                required:
                  - displayName
                  - clientRegistrationEndpoint
                  - authorizationEndpoint
                  - clientId
                  - grantTypes
        "201":
          description: Authorization server was successfully registered.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: External OAuth authorization server settings.
            properties:
              properties:
                allOf:
                  - description: External OAuth authorization server Update settings contract.
                    properties:
                      authorizationMethods:
                        description: HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
                        items:
                          enum:
                            - HEAD
                            - OPTIONS
                            - TRACE
                            - GET
                            - POST
                            - PUT
                            - PATCH
                            - DELETE
                          type: string
                          x-ms-enum:
                            modelAsString: false
                            name: AuthorizationMethod
                        type: array
                      bearerTokenSendingMethods:
                        description: "Specifies the mechanism by which access token is passed to the API. "
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-4
                        items:
                          enum:
                            - authorizationHeader
                            - query
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: BearerTokenSendingMethod
                        type: array
                      clientAuthenticationMethod:
                        description: Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
                        items:
                          enum:
                            - Basic
                            - Body
                          type: string
                          x-ms-enum:
                            modelAsString: true
                            name: ClientAuthenticationMethod
                            values:
                              - description: Basic Client Authentication method.
                                value: Basic
                              - description: Body based Authentication method.
                                value: Body
                        type: array
                      clientSecret:
                        description: Client or app secret registered with this authorization server.
                        type: string
                      defaultScope:
                        description: Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.3
                        type: string
                      description:
                        description: Description of the authorization server. Can contain HTML formatting tags.
                        type: string
                      resourceOwnerPassword:
                        description: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
                        type: string
                      resourceOwnerUsername:
                        description: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
                        type: string
                      supportState:
                        description: If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.1
                        type: boolean
                      tokenBodyParameters:
                        description: 'Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.'
                        items:
                          description: OAuth acquire token request body parameter (www-url-form-encoded).
                          properties:
                            name:
                              description: body parameter name.
                              type: string
                            value:
                              description: body parameter value.
                              type: string
                          required:
                            - name
                            - value
                        type: array
                      tokenEndpoint:
                        description: OAuth token endpoint. Contains absolute URI to entity being referenced.
                        externalDocs:
                          url: http://tools.ietf.org/html/rfc6749#section-3.1
                        type: string
                description: External OAuth authorization server settings Properties.
                properties:
                  authorizationEndpoint:
                    description: OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
                    type: string
                  clientId:
                    description: Client or app id registered with this authorization server.
                    type: string
                  clientRegistrationEndpoint:
                    description: Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
                    type: string
                  displayName:
                    description: User-friendly authorization server name.
                    maxLength: 50
                    minLength: 1
                    type: string
                  grantTypes:
                    description: Form of an authorization grant, which the client uses to request the access token.
                    externalDocs:
                      url: http://tools.ietf.org/html/rfc6749#section-4
                    items:
                      enum:
                        - authorizationCode
                        - implicit
                        - resourceOwnerPassword
                        - clientCredentials
                      type: string
                      x-ms-enum:
                        modelAsString: true
                        name: GrantType
                        values:
                          - description: Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1.
                            value: authorizationCode
                          - description: Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2.
                            value: implicit
                          - description: Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3.
                            value: resourceOwnerPassword
                          - description: Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4.
                            value: clientCredentials
                    type: array
                required:
                  - displayName
                  - clientRegistrationEndpoint
                  - authorizationEndpoint
                  - clientId
                  - grantTypes
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - AuthorizationServer
      x-ms-examples:
        ApiManagementCreateAuthorizationServer:
          parameters:
            api-version: 2019-01-01
            authsid: newauthServer
            parameters:
              properties:
                authorizationEndpoint: https://www.contoso.com/oauth2/auth
                authorizationMethods:
                  - GET
                bearerTokenSendingMethods:
                  - authorizationHeader
                clientId: "1"
                clientRegistrationEndpoint: https://www.contoso.com/apps
                clientSecret: "2"
                defaultScope: read write
                description: test server
                displayName: test2
                grantTypes:
                  - authorizationCode
                  - implicit
                resourceOwnerPassword: pwd
                resourceOwnerUsername: un
                supportState: true
                tokenEndpoint: https://www.contoso.com/oauth2/token
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer
                name: newauthServer
                properties:
                  authorizationEndpoint: https://www.contoso.com/oauth2/auth
                  authorizationMethods:
                    - GET
                  bearerTokenSendingMethods:
                    - authorizationHeader
                  clientId: "1"
                  clientRegistrationEndpoint: https://www.contoso.com/apps
                  clientSecret: "2"
                  defaultScope: read write
                  description: test server
                  displayName: test2
                  grantTypes:
                    - authorizationCode
                    - implicit
                  resourceOwnerPassword: pwd
                  resourceOwnerUsername: un
                  supportState: true
                  tokenEndpoint: https://www.contoso.com/oauth2/token
                type: Microsoft.ApiManagement/service/authorizationServers
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer
                name: newauthServer
                properties:
                  authorizationEndpoint: https://www.contoso.com/oauth2/auth
                  authorizationMethods:
                    - GET
                  bearerTokenSendingMethods:
                    - authorizationHeader
                  clientId: "1"
                  clientRegistrationEndpoint: https://www.contoso.com/apps
                  clientSecret: "2"
                  defaultScope: read write
                  description: test server
                  displayName: test2
                  grantTypes:
                    - authorizationCode
                    - implicit
                  resourceOwnerPassword: pwd
                  resourceOwnerUsername: un
                  supportState: true
                  tokenEndpoint: https://www.contoso.com/oauth2/token
                type: Microsoft.ApiManagement/service/authorizationServers
definitions: {}
