Advanced Portal Designer Documentation
Index

Users Overview

APD Users are the accounts that access your portal. They are stored separately from Business Central users and provide portal-specific authentication and authorization.

APD Users vs BC Users

Aspect APD Users BC Users
Purpose Portal access BC access
Storage APD User table BC User table
Authentication Portal login BC login
Scope External users Internal users

Authentication Types

APD supports three authentication methods:

Type Description User ID Format Password
Native Built-in APD authentication User-defined (e.g., john.doe) Stored as hash in APD
Auth0 Auth0 identity provider sub claim (e.g., auth0&#|;abc123...) Managed by Auth0
Microsoft Entra Azure AD / Entra ID ENTRA&#|;{oid} (e.g., ENTRA&#|;abc-123-...) Managed by Microsoft

Native Authentication

Traditional username/password authentication:

  • Credentials stored in APD User table
  • Password hashed (never stored in plain text)
  • Supports password expiration and lockout
  • Full control over user management

Auth0 Authentication

Integration with Auth0 identity platform:

  • Supports social logins (Google, Facebook, etc.)
  • Multi-factor authentication
  • Enterprise SSO connections
  • User ID from Auth0 sub claim

Microsoft Entra Authentication

Integration with Microsoft Entra ID (Azure AD):

  • Enterprise single sign-on
  • Microsoft account login
  • Azure AD B2C for consumers
- User ID prefixed with `ENTRA `

See External Authentication for setup details.

User Table Structure

Key Fields

Field Description
User ID Unique identifier
Email User's email address
Name Display name
Company Assigned BC company
Navision Type BC entity type
Navision Identification BC entity number
Security Filters Assigned profiles
Blocked Access blocked flag
Hashed Password Encrypted password

Accessing APD Users

  1. Open the Advanced Portal Designer menu page (search for it in Tell Me)
  2. Click Users to open the APD User list
  3. View and manage users

Creating Users

Manual Creation

  1. Open APD Users
  2. Click New
  3. Enter:
    • User ID: Unique login name
    • Email: User's email
    • Name: Display name
    • Company: Assigned company
  4. Set Navision Type and Navision Identification
  5. Assign Security Filters
  6. Set password
  7. Save

Via Invitation

Users can self-register through invitations:

  1. User receives/enters invitation code
  2. User completes registration
  3. APD creates user account
  4. User accesses portal

See Invitations

Via External Auth (Auth0 / Microsoft Entra)

When using Auth0 or Microsoft Entra:

  1. User authenticates with external provider
  2. Provider returns identity token to APD
  3. APD checks for existing user by external ID
  4. If new user:
    • APD creates user record automatically
    • User marked as Not Mapped (no BC entity link)
    • User redirected to Not Mapped Action for setup
  5. If matching invitation found (by email domain):
    • Company, security profiles, and entity type applied
    • User may still need BC Number mapping

See External Authentication See Not Mapped Users below

User Properties

Identity

Field Description
User ID Login identifier
Email Contact email
Name Full name
Contact Email Alternative email

Company Assignment

Field Description
Company BC company code
Default Company Company for new sessions

BC Entity Mapping

Field Description
Navision Type Entity type
Navision Identification Entity number
Type Description Identification
Customer Customer entity Customer No.
Vendor Vendor entity Vendor No.
Contact Contact entity Contact No.
Sales Person Salesperson/Purchaser Code

Only these four BC entity types are supported by APD. There is no "User ID" entity type that maps to a BC User record.

Security

Field Description
Security Filters Profile assignments
Blocked Access denied if Yes
Hashed Password Encrypted password

Status

Field Description
Blocked Blocks all access
Wrong Password Attempts Failed login count
Last Login Last successful login

User Entity Mapping

Purpose

Connect portal users to BC entities:

  • Customer portal: Map to Customer table
  • Vendor portal: Map to Vendor table
  • Employee portal: Map to BC User ID

Benefits

  • Security filters use <?no?> placeholder
  • User sees relevant data automatically
  • Personalized experience

Example

User: john.doe
Navision Type: Customer
Navision Identification: 10000

Security Filter:
  Table: Sales Header
  Field: Sell-to Customer No.
  Value: %4  (resolves to 10000)

John only sees his own orders.

Not Mapped Users

When users authenticate via Auth0 or Microsoft Entra for the first time, they are automatically created but marked as Not Mapped until linked to a BC entity.

What is Not Mapped?

The "Not Mapped" flag indicates:

  • User is authenticated (identity verified)
  • User has no BC entity link (NAV Identification is blank)
  • User cannot access regular portal content
  • User is redirected to the Not Mapped Action

Not Mapped Action

Create an action to handle not-mapped users:

  1. Create a new action
  2. Set Not Mapped Action = Yes
  3. Create a template that:
    • Explains the mapping requirement
    • Collects BC entity information (Customer No., etc.)
    • Or shows "pending approval" message

Not Mapped Flow

┌──────────────────┐
│ User logs in via │
│ Auth0 / Entra    │
└────────┬─────────┘
         ▼
┌──────────────────┐     Yes     ┌──────────────────┐
│ User exists in   ├────────────►│ Normal portal    │
│ APD Users?       │             │ access           │
└────────┬─────────┘             └──────────────────┘
         │ No
         ▼
┌──────────────────┐
│ Create user      │
│ NotMapped = true │
└────────┬─────────┘
         ▼
┌──────────────────┐
│ Check invitation │
│ by email domain  │
└────────┬─────────┘
         ▼
┌──────────────────┐     No      ┌──────────────────┐
│ NAV ID assigned? ├────────────►│ Redirect to      │
│                  │             │ Not Mapped Action│
└────────┬─────────┘             └──────────────────┘
         │ Yes
         ▼
┌──────────────────┐
│ Normal portal    │
│ access           │
└──────────────────┘

Not Mapped Template Example

<div class="not-mapped-container">
    <h1>Account Setup Required</h1>
    <p>Welcome, <?userid?>!</p>
    <p>Your account needs to be linked to your company record.</p>
    
    <form method="post" action="<?action(COMPLETE-MAPPING)?>">
        <div class="form-group">
            <label>Your Customer Number</label>
            <input type="text" name="customerno" 
                   placeholder="Enter your customer number from your invoice">
        </div>
        <button type="submit">Complete Setup</button>
    </form>
    
    <p class="note">
        Don't know your customer number? 
        <a href="mailto:support@company.com">Contact support</a>
    </p>
</div>

Admin Mapping

Administrators can map users manually:

  1. Open APD Users in Business Central
  2. Find the not-mapped user
  3. Set BC Type (Customer, Vendor, etc.)
  4. Set BC Number (the entity number)
  5. The Not Mapped flag clears automatically

Self-Service Mapping

Allow users to enter their own mapping:

  1. User enters Customer No. (or other identifier)
  2. Script action validates the number exists
  3. Script updates user's NAV Identification
  4. User redirected to portal

Security Profile Assignment

Assigning Profiles

In the Security Filters field:

CUSTOMER

Or multiple profiles:

CUSTOMER|PREMIUM

Profile Effect

  • Controls action access
  • Controls content visibility
  • Controls data filters
  • Controls AJAX permissions

Password Management

Setting Password

  1. Open user record
  2. Type the new password into the Password field (the OnValidate trigger enforces the minimum length and hashes it before storage — the field then displays <<HASHED>>)
  3. Save

Password Storage

  • Never stored in plain text
  • Hashed using secure algorithm
  • Cannot be recovered, only reset

Password Reset

Implement self-service reset:

  1. User requests reset
  2. Email with reset link sent
  3. User clicks link
  4. User enters new password

Failed Attempts

  • Wrong Password Attempts field tracks failures
  • After maximum attempts, user blocked
  • Admin can reset attempts

User Session Information

Available in Templates

Tag Description
<?userid?> Current user ID
<?company?> User's company
<?no?> NAV Identification (Customer No., Vendor No., etc.)
<?usertype(N)?>...<?endif?> Conditional block that opens only when the session's BC Type matches N (1=Customer, 2=Vendor, 3=Contact, 4=Sales Person)

Example Usage

<div class="user-info">
    <h3>Welcome, <?userid?>!</h3>
    <p>Company: <?company?></p>
    <?usertype(1)?>
        <p>Customer No: <?no?></p>
    <?endif?>
</div>

The <?usertype(N)?> block renders only when the session's Navision Type matches the given numeric type (1 = Customer, 2 = Vendor, 3 = Contact, 4 = Salesperson). There is no <?username?> tag or <?navisiontype?> tag — use <?userid?> for the login name and <?usertype?> for entity-type checks.

Managing Users

Viewing Users

  1. Open APD Users
  2. Use filters to find users
  3. View user details

Editing Users

  1. Select user
  2. Edit fields as needed
  3. Save

Blocking Users

  1. Select user
  2. Set Blocked = Yes
  3. Save

User cannot log in while blocked.

Unblocking Users

  1. Select user
  2. Set Blocked = No
  3. Reset Wrong Password Attempts if needed
  4. Save

Deleting Users

  1. Select user
  2. Delete record

Note: Consider blocking instead of deleting for audit purposes.

User Import/Export

Importing Users

Bulk create users from external source:

  1. Prepare data file
  2. Use Configuration Package
  3. Import users

Exporting Users

For backup or analysis:

  1. Open APD Users
  2. Export to Excel
  3. Save file

Common Patterns

Customer Self-Registration

  1. Customer receives invitation
  2. Customer registers
  3. Automatically assigned:
    • Company
    • Security profile
    • Customer mapping

Employee Portal

APD's User Type does not map to a BC user — for an employee portal, choose the BC entity that best represents the employee's role (most commonly Sales Person, mapped via the Salesperson/Purchaser Code), or leave User Type blank if the portal does not need a BC entity link. Set Security Filters and Security Setup rules to fence the user to their data.

Multi-Company Users

User can access multiple companies:

  1. Set default company
  2. Provide company selection at login
  3. User switches companies as needed

Troubleshooting

User Can't Login

  1. Check if user exists
  2. Check if blocked
  3. Check password attempts
  4. Verify password is set
  5. Check company assignment

User Sees Wrong Data

  1. Check Navision Type/Identification
  2. Verify security filters
  3. Check profile assignment

User Missing Permissions

  1. Check Security Filters field
  2. Verify profiles exist
  3. Check profile in Security Setup

Best Practices

User Naming

  • Use email as User ID when possible
  • Be consistent with naming convention
  • Avoid special characters

Security

  • Require strong passwords
  • Review blocked users regularly
  • Monitor failed login attempts

Maintenance

  • Periodically review user list
  • Remove/block inactive users
  • Update profile assignments as needed