{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "Use these REST APIs for performing operations on User entity in Azure API Management deployment. The User entity in API Management represents the developers that call the APIs of the products to which they are subscribed.",
    "title": "ApiManagementClient",
    "version": "2018-06-01-preview",
    "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/preview/2018-06-01-preview/apimusers.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "apimanagement-apimusers",
    "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}/users": {
      "get": {
        "description": "Lists a collection of registered users in the specified service instance.",
        "operationId": "User_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       | Supported operators    | Supported functions               |\n|-------------|------------------------|-----------------------------------|\n\r\n|name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n|firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n|lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n|email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n|state | eq |    |\n|registrationDate | ge, le, eq, ne, gt, lt |    |\n|note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n|groups |     |    |\n",
            "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"
          },
          {
            "in": "query",
            "name": "expandGroups",
            "type": "boolean"
          },
          {
            "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": "Lists a collection of User entities.",
            "schema": {
              "description": "Paged Users list representation.",
              "properties": {
                "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": "User details.",
                    "properties": {
                      "properties": {
                        "allOf": [
                          {
                            "description": "User Entity Base Parameters set.",
                            "properties": {
                              "identities": {
                                "description": "Collection of user identities.",
                                "items": {
                                  "description": "User identity details.",
                                  "properties": {
                                    "id": {
                                      "description": "Identifier value within provider.",
                                      "type": "string"
                                    },
                                    "provider": {
                                      "description": "Identity provider name.",
                                      "type": "string"
                                    }
                                  }
                                },
                                "type": "array"
                              },
                              "note": {
                                "description": "Optional note about a user set by the administrator.",
                                "type": "string"
                              },
                              "state": {
                                "default": "active",
                                "description": "Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.",
                                "enum": [
                                  "active",
                                  "blocked",
                                  "pending",
                                  "deleted"
                                ],
                                "type": "string",
                                "x-ms-enum": {
                                  "modelAsString": true,
                                  "name": "UserState",
                                  "values": [
                                    {
                                      "description": "User state is active.",
                                      "value": "active"
                                    },
                                    {
                                      "description": "User is blocked. Blocked users cannot authenticate at developer portal or call API.",
                                      "value": "blocked"
                                    },
                                    {
                                      "description": "User account is pending. Requires identity confirmation before it can be made active.",
                                      "value": "pending"
                                    },
                                    {
                                      "description": "User account is closed. All identities and related entities are removed.",
                                      "value": "deleted"
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        ],
                        "description": "User profile.",
                        "properties": {
                          "email": {
                            "description": "Email address.",
                            "type": "string"
                          },
                          "firstName": {
                            "description": "First name.",
                            "type": "string"
                          },
                          "groups": {
                            "description": "Collection of groups user is part of.",
                            "items": {
                              "description": "Group contract Properties.",
                              "properties": {
                                "builtIn": {
                                  "description": "true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.",
                                  "readOnly": true,
                                  "type": "boolean"
                                },
                                "description": {
                                  "description": "Group description. Can contain HTML formatting tags.",
                                  "maxLength": 1000,
                                  "type": "string"
                                },
                                "displayName": {
                                  "description": "Group name.",
                                  "maxLength": 300,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "externalId": {
                                  "description": "For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.",
                                  "type": "string"
                                },
                                "type": {
                                  "description": "Group type.",
                                  "enum": [
                                    "custom",
                                    "system",
                                    "external"
                                  ],
                                  "type": "string",
                                  "x-ms-enum": {
                                    "modelAsString": false,
                                    "name": "GroupType"
                                  }
                                }
                              },
                              "required": [
                                "displayName"
                              ]
                            },
                            "readOnly": true,
                            "type": "array"
                          },
                          "lastName": {
                            "description": "Last name.",
                            "type": "string"
                          },
                          "registrationDate": {
                            "description": "Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                            "format": "date-time",
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "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": [
          "User"
        ],
        "x-ms-examples": {
          "ApiManagementListUsers": {
            "parameters": {
              "api-version": "2018-06-01-preview",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": "",
                  "value": [
                    {
                      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1",
                      "name": "1",
                      "properties": {
                        "email": "admin@live.com",
                        "firstName": "Administrator",
                        "identities": [
                          {
                            "id": "admin@live.com",
                            "provider": "Azure"
                          }
                        ],
                        "lastName": "",
                        "registrationDate": "2015-09-22T01:57:39.677Z",
                        "state": "active"
                      },
                      "type": "Microsoft.ApiManagement/service/users"
                    },
                    {
                      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/56eaec62baf08b06e46d27fd",
                      "name": "56eaec62baf08b06e46d27fd",
                      "properties": {
                        "email": "foo.bar.83@gmail.com",
                        "firstName": "foo",
                        "identities": [
                          {
                            "id": "foo.bar.83@gmail.com",
                            "provider": "Basic"
                          }
                        ],
                        "lastName": "bar",
                        "registrationDate": "2016-03-17T17:41:56.327Z",
                        "state": "active"
                      },
                      "type": "Microsoft.ApiManagement/service/users"
                    },
                    {
                      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b",
                      "name": "5931a75ae4bbd512a88c680b",
                      "properties": {
                        "email": "foobar@outlook.com",
                        "firstName": "foo",
                        "identities": [
                          {
                            "id": "*************",
                            "provider": "Microsoft"
                          }
                        ],
                        "lastName": "bar",
                        "registrationDate": "2017-06-02T17:58:50.357Z",
                        "state": "active"
                      },
                      "type": "Microsoft.ApiManagement/service/users"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-odata": "./definitions.json#/definitions/UserContract",
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}": {
      "delete": {
        "description": "Deletes specific user.",
        "operationId": "User_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": "User identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 80,
            "minLength": 1,
            "name": "userId",
            "pattern": "^[^*#&+:<>?]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "Whether to delete user's subscription or not.",
            "in": "query",
            "name": "deleteSubscriptions",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "Send an Account Closed Email notification to the User.",
            "in": "query",
            "name": "notify",
            "required": false,
            "type": "boolean"
          },
          {
            "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 user details were successfully deleted."
          },
          "204": {
            "description": "The user details 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": [
          "User"
        ],
        "x-ms-examples": {
          "ApiManagementDeleteUser": {
            "parameters": {
              "If-Match": "*",
              "api-version": "2018-06-01-preview",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid",
              "userId": "5931a75ae4bbd512288c680b"
            },
            "responses": {
              "200": {},
              "204": {}
            }
          }
        }
      },
      "get": {
        "description": "Gets the details of the user specified by its identifier.",
        "operationId": "User_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": "User identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 80,
            "minLength": 1,
            "name": "userId",
            "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 specified user entity.",
            "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": "User details.",
              "properties": {
                "properties": {
                  "allOf": [
                    {
                      "description": "User Entity Base Parameters set.",
                      "properties": {
                        "identities": {
                          "description": "Collection of user identities.",
                          "items": {
                            "description": "User identity details.",
                            "properties": {
                              "id": {
                                "description": "Identifier value within provider.",
                                "type": "string"
                              },
                              "provider": {
                                "description": "Identity provider name.",
                                "type": "string"
                              }
                            }
                          },
                          "type": "array"
                        },
                        "note": {
                          "description": "Optional note about a user set by the administrator.",
                          "type": "string"
                        },
                        "state": {
                          "default": "active",
                          "description": "Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.",
                          "enum": [
                            "active",
                            "blocked",
                            "pending",
                            "deleted"
                          ],
                          "type": "string",
                          "x-ms-enum": {
                            "modelAsString": true,
                            "name": "UserState",
                            "values": [
                              {
                                "description": "User state is active.",
                                "value": "active"
                              },
                              {
                                "description": "User is blocked. Blocked users cannot authenticate at developer portal or call API.",
                                "value": "blocked"
                              },
                              {
                                "description": "User account is pending. Requires identity confirmation before it can be made active.",
                                "value": "pending"
                              },
                              {
                                "description": "User account is closed. All identities and related entities are removed.",
                                "value": "deleted"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "description": "User profile.",
                  "properties": {
                    "email": {
                      "description": "Email address.",
                      "type": "string"
                    },
                    "firstName": {
                      "description": "First name.",
                      "type": "string"
                    },
                    "groups": {
                      "description": "Collection of groups user is part of.",
                      "items": {
                        "description": "Group contract Properties.",
                        "properties": {
                          "builtIn": {
                            "description": "true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.",
                            "readOnly": true,
                            "type": "boolean"
                          },
                          "description": {
                            "description": "Group description. Can contain HTML formatting tags.",
                            "maxLength": 1000,
                            "type": "string"
                          },
                          "displayName": {
                            "description": "Group name.",
                            "maxLength": 300,
                            "minLength": 1,
                            "type": "string"
                          },
                          "externalId": {
                            "description": "For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.",
                            "type": "string"
                          },
                          "type": {
                            "description": "Group type.",
                            "enum": [
                              "custom",
                              "system",
                              "external"
                            ],
                            "type": "string",
                            "x-ms-enum": {
                              "modelAsString": false,
                              "name": "GroupType"
                            }
                          }
                        },
                        "required": [
                          "displayName"
                        ]
                      },
                      "readOnly": true,
                      "type": "array"
                    },
                    "lastName": {
                      "description": "Last name.",
                      "type": "string"
                    },
                    "registrationDate": {
                      "description": "Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                      "format": "date-time",
                      "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": [
          "User"
        ],
        "x-ms-examples": {
          "ApiManagementGetUser": {
            "parameters": {
              "api-version": "2018-06-01-preview",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid",
              "userId": "5931a75ae4bbd512a88c680b"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b",
                  "name": "5931a75ae4bbd512a88c680b",
                  "properties": {
                    "email": "foobar@outlook.com",
                    "firstName": "foo",
                    "identities": [
                      {
                        "id": "*************",
                        "provider": "Microsoft"
                      }
                    ],
                    "lastName": "bar",
                    "registrationDate": "2017-06-02T17:58:50.357Z",
                    "state": "active"
                  },
                  "type": "Microsoft.ApiManagement/service/users"
                }
              }
            }
          }
        }
      },
      "head": {
        "description": "Gets the entity state (Etag) version of the user specified by its identifier.",
        "operationId": "User_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": "User identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 80,
            "minLength": 1,
            "name": "userId",
            "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 user 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": [
          "User"
        ],
        "x-ms-examples": {
          "ApiManagementHeadUser": {
            "parameters": {
              "api-version": "2018-06-01-preview",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid",
              "userId": "5931a75ae4bbd512a88c680b"
            },
            "responses": {
              "200": {
                "headers": {
                  "etag": "AAAAAAAAAAa="
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Updates the details of the user specified by its identifier.",
        "operationId": "User_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": "User identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 80,
            "minLength": 1,
            "name": "userId",
            "pattern": "^[^*#&+:<>?]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "Update parameters.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "description": "User update parameters.",
              "properties": {
                "properties": {
                  "allOf": [
                    {
                      "description": "User Entity Base Parameters set.",
                      "properties": {
                        "identities": {
                          "description": "Collection of user identities.",
                          "items": {
                            "description": "User identity details.",
                            "properties": {
                              "id": {
                                "description": "Identifier value within provider.",
                                "type": "string"
                              },
                              "provider": {
                                "description": "Identity provider name.",
                                "type": "string"
                              }
                            }
                          },
                          "type": "array"
                        },
                        "note": {
                          "description": "Optional note about a user set by the administrator.",
                          "type": "string"
                        },
                        "state": {
                          "default": "active",
                          "description": "Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.",
                          "enum": [
                            "active",
                            "blocked",
                            "pending",
                            "deleted"
                          ],
                          "type": "string",
                          "x-ms-enum": {
                            "modelAsString": true,
                            "name": "UserState",
                            "values": [
                              {
                                "description": "User state is active.",
                                "value": "active"
                              },
                              {
                                "description": "User is blocked. Blocked users cannot authenticate at developer portal or call API.",
                                "value": "blocked"
                              },
                              {
                                "description": "User account is pending. Requires identity confirmation before it can be made active.",
                                "value": "pending"
                              },
                              {
                                "description": "User account is closed. All identities and related entities are removed.",
                                "value": "deleted"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "description": "Parameters supplied to the Update User operation.",
                  "properties": {
                    "email": {
                      "description": "Email address. Must not be empty and must be unique within the service instance.",
                      "maxLength": 254,
                      "minLength": 1,
                      "type": "string"
                    },
                    "firstName": {
                      "description": "First name.",
                      "maxLength": 100,
                      "minLength": 1,
                      "type": "string"
                    },
                    "lastName": {
                      "description": "Last name.",
                      "maxLength": 100,
                      "minLength": 1,
                      "type": "string"
                    },
                    "password": {
                      "description": "User Password.",
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          {
            "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 user details 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": [
          "User"
        ],
        "x-ms-examples": {
          "ApiManagementUpdateUser": {
            "parameters": {
              "If-Match": "*",
              "api-version": "2018-06-01-preview",
              "parameters": {
                "properties": {
                  "email": "foobar@outlook.com",
                  "firstName": "foo",
                  "lastName": "bar"
                }
              },
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid",
              "userId": "5931a75ae4bbd512288c680b"
            },
            "responses": {
              "204": {}
            }
          }
        }
      },
      "put": {
        "description": "Creates or Updates a user.",
        "operationId": "User_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": "User identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 80,
            "minLength": 1,
            "name": "userId",
            "pattern": "^[^*#&+:<>?]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "Create or update parameters.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "description": "User create details.",
              "properties": {
                "properties": {
                  "allOf": [
                    {
                      "description": "User Entity Base Parameters set.",
                      "properties": {
                        "identities": {
                          "description": "Collection of user identities.",
                          "items": {
                            "description": "User identity details.",
                            "properties": {
                              "id": {
                                "description": "Identifier value within provider.",
                                "type": "string"
                              },
                              "provider": {
                                "description": "Identity provider name.",
                                "type": "string"
                              }
                            }
                          },
                          "type": "array"
                        },
                        "note": {
                          "description": "Optional note about a user set by the administrator.",
                          "type": "string"
                        },
                        "state": {
                          "default": "active",
                          "description": "Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.",
                          "enum": [
                            "active",
                            "blocked",
                            "pending",
                            "deleted"
                          ],
                          "type": "string",
                          "x-ms-enum": {
                            "modelAsString": true,
                            "name": "UserState",
                            "values": [
                              {
                                "description": "User state is active.",
                                "value": "active"
                              },
                              {
                                "description": "User is blocked. Blocked users cannot authenticate at developer portal or call API.",
                                "value": "blocked"
                              },
                              {
                                "description": "User account is pending. Requires identity confirmation before it can be made active.",
                                "value": "pending"
                              },
                              {
                                "description": "User account is closed. All identities and related entities are removed.",
                                "value": "deleted"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "description": "Parameters supplied to the Create User operation.",
                  "properties": {
                    "confirmation": {
                      "description": "Determines the type of confirmation e-mail that will be sent to the newly created user.",
                      "enum": [
                        "signup",
                        "invite"
                      ],
                      "type": "string",
                      "x-ms-enum": {
                        "modelAsString": true,
                        "name": "Confirmation",
                        "values": [
                          {
                            "description": "Send an e-mail to the user confirming they have successfully signed up.",
                            "value": "signup"
                          },
                          {
                            "description": "Send an e-mail inviting the user to sign-up and complete registration.",
                            "value": "invite"
                          }
                        ]
                      }
                    },
                    "email": {
                      "description": "Email address. Must not be empty and must be unique within the service instance.",
                      "maxLength": 254,
                      "minLength": 1,
                      "type": "string"
                    },
                    "firstName": {
                      "description": "First name.",
                      "maxLength": 100,
                      "minLength": 1,
                      "type": "string"
                    },
                    "lastName": {
                      "description": "Last name.",
                      "maxLength": 100,
                      "minLength": 1,
                      "type": "string"
                    },
                    "password": {
                      "description": "User Password. If no value is provided, a default password is generated.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "email",
                    "firstName",
                    "lastName"
                  ]
                }
              }
            }
          },
          {
            "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": "User was successfully updated.",
            "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": "User details.",
              "properties": {
                "properties": {
                  "allOf": [
                    {
                      "description": "User Entity Base Parameters set.",
                      "properties": {
                        "identities": {
                          "description": "Collection of user identities.",
                          "items": {
                            "description": "User identity details.",
                            "properties": {
                              "id": {
                                "description": "Identifier value within provider.",
                                "type": "string"
                              },
                              "provider": {
                                "description": "Identity provider name.",
                                "type": "string"
                              }
                            }
                          },
                          "type": "array"
                        },
                        "note": {
                          "description": "Optional note about a user set by the administrator.",
                          "type": "string"
                        },
                        "state": {
                          "default": "active",
                          "description": "Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.",
                          "enum": [
                            "active",
                            "blocked",
                            "pending",
                            "deleted"
                          ],
                          "type": "string",
                          "x-ms-enum": {
                            "modelAsString": true,
                            "name": "UserState",
                            "values": [
                              {
                                "description": "User state is active.",
                                "value": "active"
                              },
                              {
                                "description": "User is blocked. Blocked users cannot authenticate at developer portal or call API.",
                                "value": "blocked"
                              },
                              {
                                "description": "User account is pending. Requires identity confirmation before it can be made active.",
                                "value": "pending"
                              },
                              {
                                "description": "User account is closed. All identities and related entities are removed.",
                                "value": "deleted"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "description": "User profile.",
                  "properties": {
                    "email": {
                      "description": "Email address.",
                      "type": "string"
                    },
                    "firstName": {
                      "description": "First name.",
                      "type": "string"
                    },
                    "groups": {
                      "description": "Collection of groups user is part of.",
                      "items": {
                        "description": "Group contract Properties.",
                        "properties": {
                          "builtIn": {
                            "description": "true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.",
                            "readOnly": true,
                            "type": "boolean"
                          },
                          "description": {
                            "description": "Group description. Can contain HTML formatting tags.",
                            "maxLength": 1000,
                            "type": "string"
                          },
                          "displayName": {
                            "description": "Group name.",
                            "maxLength": 300,
                            "minLength": 1,
                            "type": "string"
                          },
                          "externalId": {
                            "description": "For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.",
                            "type": "string"
                          },
                          "type": {
                            "description": "Group type.",
                            "enum": [
                              "custom",
                              "system",
                              "external"
                            ],
                            "type": "string",
                            "x-ms-enum": {
                              "modelAsString": false,
                              "name": "GroupType"
                            }
                          }
                        },
                        "required": [
                          "displayName"
                        ]
                      },
                      "readOnly": true,
                      "type": "array"
                    },
                    "lastName": {
                      "description": "Last name.",
                      "type": "string"
                    },
                    "registrationDate": {
                      "description": "Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                      "format": "date-time",
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "User was successfully created.",
            "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": "User details.",
              "properties": {
                "properties": {
                  "allOf": [
                    {
                      "description": "User Entity Base Parameters set.",
                      "properties": {
                        "identities": {
                          "description": "Collection of user identities.",
                          "items": {
                            "description": "User identity details.",
                            "properties": {
                              "id": {
                                "description": "Identifier value within provider.",
                                "type": "string"
                              },
                              "provider": {
                                "description": "Identity provider name.",
                                "type": "string"
                              }
                            }
                          },
                          "type": "array"
                        },
                        "note": {
                          "description": "Optional note about a user set by the administrator.",
                          "type": "string"
                        },
                        "state": {
                          "default": "active",
                          "description": "Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.",
                          "enum": [
                            "active",
                            "blocked",
                            "pending",
                            "deleted"
                          ],
                          "type": "string",
                          "x-ms-enum": {
                            "modelAsString": true,
                            "name": "UserState",
                            "values": [
                              {
                                "description": "User state is active.",
                                "value": "active"
                              },
                              {
                                "description": "User is blocked. Blocked users cannot authenticate at developer portal or call API.",
                                "value": "blocked"
                              },
                              {
                                "description": "User account is pending. Requires identity confirmation before it can be made active.",
                                "value": "pending"
                              },
                              {
                                "description": "User account is closed. All identities and related entities are removed.",
                                "value": "deleted"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "description": "User profile.",
                  "properties": {
                    "email": {
                      "description": "Email address.",
                      "type": "string"
                    },
                    "firstName": {
                      "description": "First name.",
                      "type": "string"
                    },
                    "groups": {
                      "description": "Collection of groups user is part of.",
                      "items": {
                        "description": "Group contract Properties.",
                        "properties": {
                          "builtIn": {
                            "description": "true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.",
                            "readOnly": true,
                            "type": "boolean"
                          },
                          "description": {
                            "description": "Group description. Can contain HTML formatting tags.",
                            "maxLength": 1000,
                            "type": "string"
                          },
                          "displayName": {
                            "description": "Group name.",
                            "maxLength": 300,
                            "minLength": 1,
                            "type": "string"
                          },
                          "externalId": {
                            "description": "For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.",
                            "type": "string"
                          },
                          "type": {
                            "description": "Group type.",
                            "enum": [
                              "custom",
                              "system",
                              "external"
                            ],
                            "type": "string",
                            "x-ms-enum": {
                              "modelAsString": false,
                              "name": "GroupType"
                            }
                          }
                        },
                        "required": [
                          "displayName"
                        ]
                      },
                      "readOnly": true,
                      "type": "array"
                    },
                    "lastName": {
                      "description": "Last name.",
                      "type": "string"
                    },
                    "registrationDate": {
                      "description": "Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                      "format": "date-time",
                      "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": [
          "User"
        ],
        "x-ms-examples": {
          "ApiManagementCreateUser": {
            "parameters": {
              "api-version": "2018-06-01-preview",
              "parameters": {
                "properties": {
                  "confirmation": "signup",
                  "email": "foobar@outlook.com",
                  "firstName": "foo",
                  "lastName": "bar"
                }
              },
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid",
              "userId": "5931a75ae4bbd512288c680b"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512288c680b",
                  "name": "5931a75ae4bbd512288c680b",
                  "properties": {
                    "email": "foobar@outlook.com",
                    "firstName": "foo",
                    "groups": [],
                    "identities": [
                      {
                        "id": "foobar@outlook.com",
                        "provider": "Basic"
                      }
                    ],
                    "lastName": "bar",
                    "registrationDate": "2018-01-07T21:21:29.16Z",
                    "state": "active"
                  },
                  "type": "Microsoft.ApiManagement/service/users"
                }
              },
              "201": {
                "body": {
                  "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512288c680b",
                  "name": "5931a75ae4bbd512288c680b",
                  "properties": {
                    "email": "foobar@outlook.com",
                    "firstName": "foo",
                    "groups": [],
                    "identities": [
                      {
                        "id": "foobar@outlook.com",
                        "provider": "Basic"
                      }
                    ],
                    "lastName": "bar",
                    "registrationDate": "2018-01-07T21:21:29.16Z",
                    "state": "active"
                  },
                  "type": "Microsoft.ApiManagement/service/users"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send": {
      "post": {
        "description": "Sends confirmation",
        "operationId": "UserConfirmationPassword_Send",
        "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": "User identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 80,
            "minLength": 1,
            "name": "userId",
            "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": {
          "204": {
            "description": "Notification successfully sent"
          },
          "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": [
          "UserConfirmationPasswordSend"
        ],
        "x-ms-examples": {
          "ApiManagementUserConfirmationPasswordSend": {
            "parameters": {
              "api-version": "2018-06-01-preview",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid",
              "userId": "57127d485157a511ace86ae7"
            },
            "responses": {
              "204": {}
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl": {
      "post": {
        "description": "Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal.",
        "operationId": "User_GenerateSsoUrl",
        "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": "User identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 80,
            "minLength": 1,
            "name": "userId",
            "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": "The response body contains the single sign-on URL.",
            "schema": {
              "description": "Generate SSO Url operations response details.",
              "properties": {
                "value": {
                  "description": "Redirect Url containing the SSO URL value.",
                  "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": [
          "Users"
        ],
        "x-ms-examples": {
          "ApiManagementUserGenerateSsoUrl": {
            "parameters": {
              "api-version": "2018-06-01-preview",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid",
              "userId": "57127d485157a511ace86ae7"
            },
            "responses": {
              "200": {
                "body": {
                  "value": "https://apimService1.portal.azure-api.net/signin-sso?token=57127d485157a511ace86ae7%26201706051624%267VY18MlwAom***********2bYr2bDQHg21OzQsNakExQ%3d%3d"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups": {
      "get": {
        "description": "Lists all user groups.",
        "operationId": "UserGroup_List",
        "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": "User identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 80,
            "minLength": 1,
            "name": "userId",
            "pattern": "^[^*#&+:<>?]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "| Field       | Supported operators    | Supported functions               |\n|-------------|------------------------|-----------------------------------|\n\r\n|name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n|displayName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n|description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n",
            "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": "Lists a collection of Group entities.",
            "schema": {
              "description": "Paged Group list representation.",
              "properties": {
                "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": "Contract details.",
                    "properties": {
                      "properties": {
                        "description": "Group contract Properties.",
                        "properties": {
                          "builtIn": {
                            "description": "true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.",
                            "readOnly": true,
                            "type": "boolean"
                          },
                          "description": {
                            "description": "Group description. Can contain HTML formatting tags.",
                            "maxLength": 1000,
                            "type": "string"
                          },
                          "displayName": {
                            "description": "Group name.",
                            "maxLength": 300,
                            "minLength": 1,
                            "type": "string"
                          },
                          "externalId": {
                            "description": "For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null.",
                            "type": "string"
                          },
                          "type": {
                            "description": "Group type.",
                            "enum": [
                              "custom",
                              "system",
                              "external"
                            ],
                            "type": "string",
                            "x-ms-enum": {
                              "modelAsString": false,
                              "name": "GroupType"
                            }
                          }
                        },
                        "required": [
                          "displayName"
                        ]
                      }
                    }
                  },
                  "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": [
          "UserGroup"
        ],
        "x-ms-examples": {
          "ApiManagementListUserGroups": {
            "parameters": {
              "api-version": "2018-06-01-preview",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid",
              "userId": "57681833a40f7eb6c49f6acf"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": "",
                  "value": [
                    {
                      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57681833a40f7eb6c49f6acf/groups/5600b57e7e8880006a020002",
                      "name": "5600b57e7e8880006a020002",
                      "properties": {
                        "builtIn": true,
                        "description": "Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.",
                        "displayName": "Developers",
                        "type": "system"
                      },
                      "type": "Microsoft.ApiManagement/service/users/groups"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-odata": "./definitions.json#/definitions/GroupContract",
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities": {
      "get": {
        "description": "List of all user identities.",
        "operationId": "UserIdentities_List",
        "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": "User identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 80,
            "minLength": 1,
            "name": "userId",
            "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": "Lists of User Identities.",
            "schema": {
              "description": "List of Users Identity 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": "User Identity values.",
                  "items": {
                    "description": "User identity details.",
                    "properties": {
                      "id": {
                        "description": "Identifier value within provider.",
                        "type": "string"
                      },
                      "provider": {
                        "description": "Identity provider name.",
                        "type": "string"
                      }
                    }
                  },
                  "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": [
          "UserIdentity"
        ],
        "x-ms-examples": {
          "ApiManagementListUserIdentities": {
            "parameters": {
              "api-version": "2018-06-01-preview",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid",
              "userId": "57f2af53bb17172280f44057"
            },
            "responses": {
              "200": {
                "body": {
                  "count": 1,
                  "nextLink": "",
                  "value": [
                    {
                      "id": "086cf9********55ab",
                      "provider": "Microsoft"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions": {
      "get": {
        "description": "Lists the collection of subscriptions of the specified user.",
        "operationId": "UserSubscription_List",
        "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": "User identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 80,
            "minLength": 1,
            "name": "userId",
            "pattern": "^[^*#&+:<>?]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "| Field       | Supported operators    | Supported functions               |\n|-------------|------------------------|-----------------------------------|\n\r\n|name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n|displayName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n|stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n|ownerId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n|scope | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n|userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n|productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n",
            "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": "Lists a collection of Subscription entities.",
            "schema": {
              "description": "Paged Subscriptions list representation.",
              "properties": {
                "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": "Subscription details.",
                    "properties": {
                      "properties": {
                        "description": "Subscription details.",
                        "properties": {
                          "allowTracing": {
                            "description": "Determines whether tracing is enabled",
                            "type": "boolean",
                            "x-apim-code-nillable": true
                          },
                          "createdDate": {
                            "description": "Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                            "format": "date-time",
                            "readOnly": true,
                            "type": "string"
                          },
                          "displayName": {
                            "description": "The name of the subscription, or null if the subscription has no name.",
                            "maxLength": 100,
                            "minLength": 0,
                            "type": "string"
                          },
                          "endDate": {
                            "description": "Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                            "format": "date-time",
                            "type": "string"
                          },
                          "expirationDate": {
                            "description": "Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                            "format": "date-time",
                            "type": "string"
                          },
                          "notificationDate": {
                            "description": "Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                            "format": "date-time",
                            "type": "string"
                          },
                          "ownerId": {
                            "description": "The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier.",
                            "type": "string"
                          },
                          "primaryKey": {
                            "description": "Subscription primary key.",
                            "maxLength": 256,
                            "minLength": 1,
                            "type": "string"
                          },
                          "scope": {
                            "description": "Scope like /products/{productId} or /apis or /apis/{apiId}.",
                            "type": "string"
                          },
                          "secondaryKey": {
                            "description": "Subscription secondary key.",
                            "maxLength": 256,
                            "minLength": 1,
                            "type": "string"
                          },
                          "startDate": {
                            "description": "Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                            "format": "date-time",
                            "type": "string"
                          },
                          "state": {
                            "description": "Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.",
                            "enum": [
                              "suspended",
                              "active",
                              "expired",
                              "submitted",
                              "rejected",
                              "cancelled"
                            ],
                            "type": "string",
                            "x-ms-enum": {
                              "modelAsString": false,
                              "name": "SubscriptionState"
                            }
                          },
                          "stateComment": {
                            "description": "Optional subscription comment added by an administrator.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "scope",
                          "state",
                          "primaryKey",
                          "secondaryKey"
                        ]
                      }
                    }
                  },
                  "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": [
          "UserSubscription"
        ],
        "x-ms-examples": {
          "ApiManagementListUserSubscriptions": {
            "parameters": {
              "api-version": "2018-06-01-preview",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid",
              "userId": "57681833a40f7eb6c49f6acf"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": "",
                  "value": [
                    {
                      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57681833a40f7eb6c49f6acf/subscriptions/57681850a40f7eb6c49f6ae3",
                      "name": "57681850a40f7eb6c49f6ae3",
                      "properties": {
                        "createdDate": "2016-06-20T16:22:39.547Z",
                        "displayName": "57681850a40f7eb6c49f6ae5",
                        "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57681833a40f7eb6c49f6acf",
                        "primaryKey": "57681850a40f7eb6c49f6ae4",
                        "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5768181ea40f7eb6c49f6ac7",
                        "secondaryKey": "bbd884a96b3c41b49f34422dac74b345",
                        "startDate": "2016-06-20T00:00:00Z",
                        "state": "active"
                      },
                      "type": "Microsoft.ApiManagement/service/users/subscriptions"
                    },
                    {
                      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57681833a40f7eb6c49f6acf/subscriptions/57681850a40f7eb6c49f6b2b",
                      "name": "57681850a40f7eb6c49f6b2b",
                      "properties": {
                        "createdDate": "2016-06-20T16:22:41.103Z",
                        "displayName": "57681850a40f7eb6c49f6b2d",
                        "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57681833a40f7eb6c49f6acf",
                        "primaryKey": "57681850a40f7eb6c49f6b2c",
                        "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5768181ea40f7eb6c49f6ac7",
                        "secondaryKey": "125f565d276647dc825d7f25ea40ee57",
                        "startDate": "2016-06-20T00:00:00Z",
                        "state": "active"
                      },
                      "type": "Microsoft.ApiManagement/service/users/subscriptions"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-odata": "./definitions.json#/definitions/SubscriptionContract",
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token": {
      "post": {
        "description": "Gets the Shared Access Authorization Token for the User.",
        "operationId": "User_GetSharedAccessToken",
        "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": "User identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 80,
            "minLength": 1,
            "name": "userId",
            "pattern": "^[^*#&+:<>?]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "Create Authorization Token parameters.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "description": "Parameters supplied to the Get User Token operation.",
              "properties": {
                "expiry": {
                  "description": "The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                  "format": "date-time",
                  "type": "string"
                },
                "keyType": {
                  "default": "primary",
                  "description": "The Key to be used to generate token for user.",
                  "enum": [
                    "primary",
                    "secondary"
                  ],
                  "type": "string",
                  "x-ms-enum": {
                    "modelAsString": false,
                    "name": "KeyType"
                  }
                }
              },
              "required": [
                "keyType",
                "expiry"
              ]
            }
          },
          {
            "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 response body contains the authorization token for the user.",
            "schema": {
              "description": "Get User Token response details.",
              "properties": {
                "value": {
                  "description": "Shared Access Authorization token for the User.",
                  "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": [
          "UserToken"
        ],
        "x-ms-examples": {
          "ApiManagementUserToken": {
            "parameters": {
              "api-version": "2018-06-01-preview",
              "parameters": {
                "expiry": "2017-05-13T10:39:35Z",
                "keyType": "primary"
              },
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid",
              "userId": "57f2af53bb17172280f44057"
            },
            "responses": {
              "200": {
                "body": {
                  "value": "57f2af53bb17172280f44057&201705131039&***************************/tJVExvjA=="
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {}
}