Quasr
  • Introduction
    • Welcome to Quasr
    • Concepts
      • Flexible Authentication
      • User-Centric Privacy
      • Modern Development
    • Terminology
    • FAQs
  • Getting Started
    • Sign up with Quasr
    • Setup your tenant
      • Factor Configuration
      • Enrolling additional factors
      • Test with the Sample Client
      • Understanding Scopes & Scores
      • Setting up an API Client (M2M)
    • Connect your app
      • Hosted Login UI
      • Custom Login UI
      • Embedded Login UI
  • Account Administration
    • Introduction
    • Account & Billing
      • Metrics
    • Tenants
    • Usage & Statistics
    • Security
  • Tenant Administration
    • Introduction
    • Dashboard
    • Tenant Settings
    • Your Security
    • Accounts
      • Tenant Admins
    • Factors
      • Factors and Scoring
      • Username (ID)
      • Identity Provider (IDP)
        • Apple
        • Facebook
        • GitHub
        • Google
        • LinkedIn
        • Slack
      • Time-based One-time Password (TOTP)
      • One-Time Password (OTP)
      • Password
      • Secret
    • Controls
      • Configuration
      • Permissions
      • Consents
      • Rules
    • Attributes
      • Capturing Claims
      • Sourcing Claims
      • Viewing Claims
      • Searching Claims / Users
      • Sharing Claims
    • Extensions
      • Synchronous
      • Asynchronous
    • Tokens
      • Session Token (OAuth 2.0)
      • Access Token (OAuth 2.0)
      • Refresh Token (OAuth 2.0)
      • ID Token (OIDC 1.0)
      • Consent Token
      • Authorization Code (OAuth 2.0)
    • Hosted Login Page
    • APIs
      • Authentication API
      • Management API (GraphQL)
  • Legal
    • Terms of Service
    • Acceptable Use Policy
    • DPA & Subprocessors
  • More Info
    • Standards
    • Security
      • Vulnerability Disclosure
      • Wall of Recognition
    • Support
    • Status
Powered by GitBook
On this page
  • Tenant Creation via Management API
  • GraphQL Example
  • Node.js Example
  1. Account Administration

Tenants

PreviousMetricsNextUsage & Statistics

Last updated 1 year ago

This section provides an overview of your tenants. It shows the number of Monthly Active Accounts (MAA) per tenant, the tenant expiration, status, as well as a link to jump into the Tenant Administration UI for each tenant.

You can create new tenants from here. You can create up to 3 tenants, the free contingent in any subscription plan, until you are required to provide billing information.

Tenant Creation via Management API

The example call below with the following input variables:

{
  "input": {
    "label": "Demo Tenant",
    "subscription": "sub_1Klq....", // a valid current subscription
    "status": "ENABLED",
    "config": {
      "color": "#660000"
    }
  }
}

creates a tenant with label Demo Tenant under your chosen subscription, status set to ENABLED, and a color code of #660000.

You find your subscription number under the Account Administration UI > Account & Billing > Subscriptions ("Subscription Number").

GraphQL Example

// GraphQL Query (Sample)
mutation createTenant ($input: CreateTenantInput!) {
    createTenant (input: $input) {
        id        
    }
}

// GraphQL Variables (Sample)
{
  "input": {
    "label": "Demo Tenant",
    "subscription": "sub_1KlqjQL3CzwCmC47Gn4xxxxx",
    "status": "ENABLED",
    "config": {
      "color": "#660000"
    }
  }
}

// Response (Sample)
{
    "data": {
        "createTenant": {
            "id": "ace6eb2f-2fc8-4870-9d48-f897ed1f81cb"
        }
    }
}

Node.js Example

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation createTenant ($input: CreateTenantInput!) {
    createTenant (input: $input) {
        id        
    }
}`,
  variables: {"input":{"label":"Demo Tenant","subscription":"sub_1KlqjQL3CzwCmC47Gn4xxxxx","status":"ENABLED","config":{"color":"#660000"}}}
});

var config = {
  method: 'post',
  url: 'https://{tenant_id}.api.quasr.io/graphql',
  headers: { 
    'Authorization': 'Bearer {access_token}', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

You can also create tenants through the .

Management API
Tenants in the Quasr Account UI