{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-storage-accounts/json-schema/azure-storage-accounts-local-user-schema.json",
  "title": "LocalUser",
  "description": "The local user associated with the storage accounts.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-storage-accounts-localuseroperationgroup-api-openapi.yml#/components/schemas/LocalUser",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/LocalUserProperties",
      "description": "Storage account local user properties.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "LocalUserProperties": {
      "type": "object",
      "description": "The Storage Account Local User properties.",
      "properties": {
        "permissionScopes": {
          "type": "array",
          "description": "The permission scopes of the local user.",
          "items": {
            "$ref": "#/$defs/PermissionScope"
          },
          "x-ms-identifiers": []
        },
        "homeDirectory": {
          "type": "string",
          "description": "Optional, local user home directory."
        },
        "sshAuthorizedKeys": {
          "type": "array",
          "description": "Optional, local user ssh authorized keys for SFTP.",
          "items": {
            "$ref": "#/$defs/SshPublicKey"
          },
          "x-ms-identifiers": []
        },
        "sid": {
          "type": "string",
          "description": "A unique Security Identifier that is generated by the server.",
          "readOnly": true
        },
        "hasSharedKey": {
          "type": "boolean",
          "description": "Indicates whether shared key exists. Set it to false to remove existing shared key."
        },
        "hasSshKey": {
          "type": "boolean",
          "description": "Indicates whether ssh key exists. Set it to false to remove existing SSH key."
        },
        "hasSshPassword": {
          "type": "boolean",
          "description": "Indicates whether ssh password exists. Set it to false to remove existing SSH password."
        },
        "userId": {
          "type": "integer",
          "format": "int32",
          "description": "A unique Identifier that is generated by the server.",
          "readOnly": true
        },
        "groupId": {
          "type": "integer",
          "format": "int32",
          "description": "An identifier for associating a group of users."
        },
        "allowAclAuthorization": {
          "type": "boolean",
          "description": "Indicates whether ACL authorization is allowed for this user. Set it to false to disallow using ACL authorization."
        },
        "extendedGroups": {
          "type": "array",
          "description": "Supplementary group membership. Only applicable for local users enabled for NFSv3 access.",
          "items": {
            "type": "integer",
            "format": "int32"
          }
        },
        "isNFSv3Enabled": {
          "type": "boolean",
          "description": "Indicates if the local user is enabled for access with NFSv3 protocol."
        }
      }
    },
    "PermissionScope": {
      "type": "object",
      "properties": {
        "permissions": {
          "type": "string",
          "description": "The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), Create (c), Modify Ownership (o), and Modify Permissions (p)."
        },
        "service": {
          "type": "string",
          "description": "The service used by the local user, e.g. blob, file."
        },
        "resourceName": {
          "type": "string",
          "description": "The name of resource, normally the container name or the file share name, used by the local user."
        }
      },
      "required": [
        "permissions",
        "service",
        "resourceName"
      ]
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "title": "Resource",
      "description": "Common fields that are returned in the response for all Azure Resource Manager resources",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"",
          "readOnly": true
        },
        "systemData": {
          "$ref": "#/$defs/systemData",
          "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    },
    "SshPublicKey": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "Optional. It is used to store the function/usage of the key"
        },
        "key": {
          "type": "string",
          "description": "Ssh public key base64 encoded. The format should be: '<keyType> <keyData>', e.g. ssh-rsa AAAABBBB"
        }
      }
    }
  }
}