Create Portal
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens
Creates a new DNN portal (site) in the same installation, and saves the new portal's ID in a token. The portal is built from the Blank Website template, as a parent portal with its own alias.
note
This action is part of the Portal Management add-on, which is installed and licensed separately (feature package PORTAL). If it isn't licensed, the action fails with a not-licensed error.
Typical Use Cases
- Set up a new site for a customer or department from a sign-up form or an admin tool
- Provision test or demo sites from a workflow
- Build a portal, then add pages and modules to it with the other Portal Management actions
Don't use it to
- Create a child portal (for example
example.com/sales). The action always creates a parent portal. - Create a portal from a template other than Blank Website. There's no template parameter.
- Create a page in the current portal. Use Create Page instead.
Related Actions
| Action Name | Description |
|---|---|
| Load Portal | Reads the new portal's details into tokens. |
| Update Portal | Changes the name, administrator, keywords, description or email later. |
| Delete Portal | Deletes a portal. |
| Create Page | Adds pages to a portal. |
| Add Module | Adds modules to a page. |
| Load User | Finds the user ID to use as Administrator Id. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Portal Name (required) | The name of the new portal, for example [CompanyName] Portal. | Yes | empty string | Yes |
| Portal Alias (required) | The alias (domain) the new portal answers to, for example acme.example.com. Spaces around it are trimmed. It can't contain spaces and must be unique in the installation. The domain must also point to your server. | Yes | empty string | Yes |
| Home Directory | The portal's home folder, in the format Portals/{directory name}, for example Portals/acme. Leave it empty to use Portals/{portalId}. | Yes | empty string | No |
| Administrator Id | The user ID of the portal administrator. If it's empty or not a number, the user running the action becomes the administrator. | Yes | empty string | No |
| KeyWords | The portal's keywords. | Yes | empty string | No |
| Description | The portal's description. | Yes | empty string | No |
| The portal's email address. | Yes | empty string | No |
Output Parameters Reference
| Parameter | Description |
|---|---|
| Token portal id | The name of the token that receives the new portal's ID (a number), for example NewPortalId. Square brackets are removed, and tokens aren't applied to the name. Leave it empty if you don't need the ID. |
Considerations
- There's no permission check in the action. Anyone who can run it creates a portal. Only put it on pages, forms, workflows or APIs that host users (superusers) can reach, and add a condition as a second guard.
- Run it as a logged-in user, or set Administrator Id. When Administrator Id is empty, the current user becomes the administrator. The action doesn't check that the user ID exists.
- The Blank Website template must be installed. The action looks for a template whose name contains
Blank Website, and fails if there isn't one. - Plant an App modules on the new portal need a license. Forms, Listings, Search and Nav only work on secondary portals licensed with the MultiPortal licensing add-on. See MultiPortal Licensing.
- Name and alias are checked first. If Portal Name or Portal Alias is empty, or the alias contains a space, the action fails before anything is created.
Examples
tip
To understand how to use the below examples, please see Running Examples.
1. Create a site for a new customer
This action creates a portal from form fields, makes the user in [AdminUserId] its administrator, and saves the new portal's ID in [NewPortalId].
{
"Title": "Create Portal",
"ActionType": "CreatePortal",
"Description": "Create a portal for the customer",
"Condition": "[AdminUserId] != \"\"",
"Parameters": {
"PortalName": "[CompanyName]",
"PortalAlias": "[Subdomain].example.com",
"HomeDirectory": "Portals/[Subdomain]",
"AdministratorId": "[AdminUserId]",
"KeyWords": "[CompanyName], customer portal",
"Description": "Customer portal for [CompanyName]",
"Email": "[ContactEmail]",
"TokenNameForPortalId": "NewPortalId"
}
}
Revised 09/27/2026