If you are using delegated authentication, namespace is one of the user properties that can be set - I set this so that staff in different roles are delegated to a namespace depending on their job requirements. From Intersystems online documentation,

 https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCAS_delegated

>>"NameSpace: if ZAUTHENTICATE sets the value of Properties("Namespace"), then that string becomes the value of the user account’s Startup Namespace property in Caché."<<