{"record":{"id":"b21d45f00be0a599","repo":"invoke-ai/InvokeAI","slug":"the-selected-saved-workflow-self-workflow-id-b21d45","errorCode":null,"errorMessage":"The selected saved workflow '${self.workflow_id}' is not accessible to this user.","messagePattern":"The selected saved workflow '(.+?)' is not accessible to this user\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/call_saved_workflow.py","lineNumber":68,"sourceCode":"\n    def validate_selected_workflow(self, context: InvocationContext):\n        if not self.workflow_id:\n            raise ValueError(\"A saved workflow must be selected before executing call_saved_workflow.\")\n\n        try:\n            workflow_record = context._services.workflow_records.get(self.workflow_id)\n        except WorkflowNotFoundError as e:\n            raise ValueError(f\"The selected saved workflow '{self.workflow_id}' could not be found.\") from e\n\n        config = context._services.configuration\n        if config.multiuser:\n            queue_user_id = context._data.queue_item.user_id\n            user = context._services.users.get(queue_user_id)\n            is_admin = bool(user and user.is_admin)\n            is_owner = workflow_record.user_id == queue_user_id\n            is_default = workflow_record.workflow.meta.category is WorkflowCategory.Default\n            if not (is_default or is_owner or workflow_record.is_public or is_admin):\n                raise ValueError(f\"The selected saved workflow '{self.workflow_id}' is not accessible to this user.\")\n\n        return workflow_record\n\n    def invoke(self, context: InvocationContext) -> WorkflowReturnOutput:\n        self.validate_selected_workflow(context)\n\n        return WorkflowReturnOutput(values={})\n","sourceCodeStart":50,"sourceCodeEnd":76,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/call_saved_workflow.py#L50-L76","documentation":"In multiuser mode InvokeAI enforces access control on saved workflows. validate_selected_workflow denies execution unless the requesting queue user is an admin, the workflow's owner, the workflow is public, or it is a Default-category workflow.","triggerScenarios":"invoke()/run_node() in multiuser mode where workflow_record.user_id != queue_item.user_id, workflow_record.is_public is False, meta.category is not Default, and the queue user is not an admin.","commonSituations":"One user referencing another user's private workflow in a shared graph; running queued graphs from a service account that differs from the workflow owner; workflows left non-public after multiuser was enabled in config.","solutions":["Have the workflow owner mark the workflow public (or be a Default workflow).","Ask an admin user to run the queue item, or grant the queue user admin rights.","Re-create/copy the workflow under the executing user's account and point the node at it.","Disable multiuser in config if access control is not needed."],"exampleFix":"// before (config.multiuser = true, workflow private, other user's)\n// after: owner sets workflow.is_public = True (or share as Default category) before queueing","handlingStrategy":"validation","validationCode":"user = context._services.users.get(queue_item.user_id)\nrecord = context._services.workflow_records.get(node.workflow_id)\nallowed = record.workflow.meta.category is WorkflowCategory.Default or record.is_public or record.user_id == queue_item.user_id or (user and user.is_admin)\nif not allowed:\n    raise PermissionError(\"workflow not accessible to this user\")","typeGuard":null,"tryCatchPattern":"try:\n    node.invoke(context)\nexcept ValueError as e:\n    if \"not accessible to this user\" in str(e):\n        request_access_or_run_as_owner()\n    else:\n        raise","preventionTips":["Only reference workflows owned by the executing queue user, or made public/Default","In multiuser mode, run graphs under the owner's account","Document workflow-sharing rules for teams"],"tags":["permissions","multiuser","workflow","invokeai"],"backgroundTag":"permission-denied","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}