Home » Building a SaaS Product » User Accounts

How to Structure SaaS User Accounts and Permissions

Every SaaS product needs a user account system that handles registration, login, session management, and data isolation between customers. Most SaaS products also need sub-user accounts so teams can share access, and role-based permissions to control what each team member can do.

The Account Hierarchy

A well-designed SaaS account system has three levels:

The platform's Account Admin system implements this hierarchy automatically. When someone registers, they get an account with a unique account ID. All of that account's data across every app is partitioned by this ID. The owner can then invite sub-users who log in with their own credentials but see the same account data.

How Registration and Login Work

The platform handles the complete authentication flow:

You do not need to build any of this yourself. It works out of the box when you set up a customer portal on your domain. See How to Create User Registration and Login for Your SaaS for the setup details.

Role-Based Permissions

For SaaS products used by teams, you need to control what each user can see and do. Common permission levels include:

The platform supports role-based access control through the Account Admin system. You define which roles exist and what each role can access, and the admin panel enforces those permissions automatically in the UI.

Sub-User Management

The account owner needs to be able to invite team members, assign roles, and remove access when someone leaves. The platform's sub-user system handles this with a simple flow:

Data Access Patterns by Role

When designing your custom app, think about what data each role needs:

API Key Access

If your SaaS product has an API that customers can call programmatically, you need API key management in addition to user login. The platform provides API key generation and validation built into the account system. Each API key is tied to an account ID, so API requests are automatically scoped to the correct customer data.

For SaaS products that need both a web interface and an API (which is most of them), the platform handles both authentication methods. Web users log in with email and password through the admin panel. API users authenticate with an API key in their request headers. Both paths lead to the same account data.

Security note: Never store passwords in plain text. The platform handles password hashing automatically. Sessions expire after configurable timeouts. API keys can be rotated by the account owner at any time.

User accounts, roles, and permissions are built into the platform. Focus on your product features, not authentication plumbing.

Get Started Free