DNAnexus Documentation
APIDownloadsIndex of dx CommandsLegal
  • Overview
  • Getting Started
    • DNAnexus Essentials
    • Key Concepts
      • Projects
      • Organizations
      • Apps and Workflows
    • User Interface Quickstart
    • Command Line Quickstart
    • Developer Quickstart
    • Developer Tutorials
      • Bash
        • Bash Helpers
        • Distributed by Chr (sh)
        • Distributed by Region (sh)
        • SAMtools count
        • TensorBoard Example Web App
        • Git Dependency
        • Mkfifo and dx cat
        • Parallel by Region (sh)
        • Parallel xargs by Chr
        • Precompiled Binary
        • R Shiny Example Web App
      • Python
        • Dash Example Web App
        • Distributed by Region (py)
        • Parallel by Chr (py)
        • Parallel by Region (py)
        • Pysam
      • Web App(let) Tutorials
        • Dash Example Web App
        • TensorBoard Example Web App
      • Concurrent Computing Tutorials
        • Distributed
          • Distributed by Region (sh)
          • Distributed by Chr (sh)
          • Distributed by Region (py)
        • Parallel
          • Parallel by Chr (py)
          • Parallel by Region (py)
          • Parallel by Region (sh)
          • Parallel xargs by Chr
  • User
    • Login and Logout
    • Projects
      • Project Navigation
      • Path Resolution
    • Running Apps and Workflows
      • Running Apps and Applets
      • Running Workflows
      • Running Nextflow Pipelines
      • Running Batch Jobs
      • Monitoring Executions
      • Job Notifications
      • Job Lifecycle
      • Executions and Time Limits
      • Executions and Cost and Spending Limits
      • Smart Reuse (Job Reuse)
      • Apps and Workflows Glossary
      • Tools List
    • Cohort Browser
      • Chart Types
        • Row Chart
        • Histogram
        • Box Plot
        • List View
        • Grouped Box Plot
        • Stacked Row Chart
        • Scatter Plot
        • Kaplan-Meier Survival Curve
      • Locus Details Page
    • Using DXJupyterLab
      • DXJupyterLab Quickstart
      • Running DXJupyterLab
        • FreeSurfer in DXJupyterLab
      • Spark Cluster-Enabled DXJupyterLab
        • Exploring and Querying Datasets
      • Stata in DXJupyterLab
      • Running Older Versions of DXJupyterLab
      • DXJupyterLab Reference
    • Using Spark
      • Apollo Apps
      • Connect to Thrift
      • Example Applications
        • CSV Loader
        • SQL Runner
        • VCF Loader
      • VCF Preprocessing
    • Environment Variables
    • Objects
      • Describing Data Objects
      • Searching Data Objects
      • Visualizing Data
      • Filtering Objects and Jobs
      • Archiving Files
      • Relational Database Clusters
      • Symlinks
      • Uploading and Downloading Files
        • Small File Sets
          • dx upload
          • dx download
        • Batch
          • Upload Agent
          • Download Agent
    • Platform IDs
    • Organization Member Guide
    • Index of dx commands
  • Developer
    • Developing Portable Pipelines
      • dxCompiler
    • Cloud Workstation
    • Apps
      • Introduction to Building Apps
      • App Build Process
      • Advanced Applet Tutorial
      • Bash Apps
      • Python Apps
      • Spark Apps
        • Table Exporter
        • DX Spark Submit Utility
      • HTTPS Apps
        • Isolated Browsing for HTTPS Apps
      • Transitioning from Applets to Apps
      • Third Party and Community Apps
        • Community App Guidelines
        • Third Party App Style Guide
        • Third Party App Publishing Checklist
      • App Metadata
      • App Permissions
      • App Execution Environment
        • Connecting to Jobs
      • Dependency Management
        • Asset Build Process
        • Docker Images
        • Python package installation in Ubuntu 24.04 AEE
      • Job Identity Tokens for Access to Clouds and Third-Party Services
      • Enabling Web Application Users to Log In with DNAnexus Credentials
      • Types of Errors
    • Workflows
      • Importing Workflows
      • Introduction to Building Workflows
      • Building and Running Workflows
      • Workflow Build Process
      • Versioning and Publishing Global Workflows
      • Workflow Metadata
    • Ingesting Data
      • Molecular Expression Assay Loader
        • Common Errors
        • Example Usage
        • Example Input
      • Data Model Loader
        • Data Ingestion Key Steps
        • Ingestion Data Types
        • Data Files Used by the Data Model Loader
        • Troubleshooting
      • Dataset Extender
        • Using Dataset Extender
    • Dataset Management
      • Rebase Cohorts and Dashboards
      • Assay Dataset Merger
      • Clinical Dataset Merger
    • Apollo Datasets
      • Dataset Versions
      • Cohorts
    • Creating Custom Viewers
    • Client Libraries
      • Support for Python 3
    • Walkthroughs
      • Creating a Mixed Phenotypic Assay Dataset
      • Guide for Ingesting a Simple Four Table Dataset
    • DNAnexus API
      • Entity IDs
      • Protocols
      • Authentication
      • Regions
      • Nonces
      • Users
      • Organizations
      • OIDC Clients
      • Data Containers
        • Folders and Deletion
        • Cloning
        • Project API Methods
        • Project Permissions and Sharing
      • Data Object Lifecycle
        • Types
        • Object Details
        • Visibility
      • Data Object Metadata
        • Name
        • Properties
        • Tags
      • Data Object Classes
        • Records
        • Files
        • Databases
        • Drives
        • DBClusters
      • Running Analyses
        • I/O and Run Specifications
        • Instance Types
        • Job Input and Output
        • Applets and Entry Points
        • Apps
        • Workflows and Analyses
        • Global Workflows
        • Containers for Execution
      • Search
      • System Methods
      • Directory of API Methods
      • DNAnexus Service Limits
  • Administrator
    • Billing
    • Org Management
    • Single Sign-On
    • Audit Trail
    • Integrating with External Services
    • Portal Setup
    • GxP
      • Controlled Tool Access (allowed executables)
  • Science Corner
    • Scientific Guides
      • Somatic Small Variant and CNV Discovery Workflow Walkthrough
      • SAIGE GWAS Walkthrough
      • LocusZoom DNAnexus App
      • Human Reference Genomes
    • Using Hail to Analyze Genomic Data
    • Open-Source Tools by DNAnexus Scientists
    • Using IGV Locally with DNAnexus
  • Downloads
  • FAQs
    • EOL Documentation
      • Python 3 Support and Python 2 End of Life (EOL)
    • Automating Analysis Workflow
    • Backups of Customer Data
    • Developing Apps and Applets
    • Importing Data
    • Platform Uptime
    • Legal and Compliance
    • Sharing and Collaboration
    • Product Version Numbering
  • Release Notes
  • Technical Support
  • Legal
Powered by GitBook

Copyright 2025 DNAnexus

On this page
  • Logging In via the Command-Line Interface
  • Logging Out via the Command-Line Interface
  • Auto Logout
  • Using Tokens
  • Generating a Token
  • Using a Token to Log In
  • When to Use Tokens
  • Revoking a Token
  • Logging In Non-Interactively
  • Two-Factor Authentication
  • Enabling Two-Factor Authentication
  • Disabling Two-Factor Authentication

Was this helpful?

Export as PDF
  1. User

Login and Logout

Learn how to log into and out of the DNAnexus Platform, via both the user interface and the command-line interface. Learn how to use tokens to log in, and how to set up two-factor authentication.

Last updated 2 days ago

Was this helpful?

Logging In and Out via the User Interface

To log in via the user interface (UI), open the and enter your username and password.

To log out via the UI, click on your avatar at the far right end of the main Platform menu, then select Sign Out:

Logging In via the Command-Line Interface

Next, enter your username, or, if you've logged in before on the same computer and your username is displayed, hit Return to confirm that you want to use it to log in. Then enter your password.

Logging Out via the Command-Line Interface

Auto Logout

Using Tokens

You can log in via the CLI, and stay logged in for a fixed length of time, by using an API token, also called an authentication token.

Be very careful about giving a DNAnexus Platform token to someone else. Anyone in possession of that token can use it to access the Platform and impersonate you as a user. They will have the same access level as you, for any projects to which the token has access, potentially allowing them to run jobs, incurring charges to your account.

Generating a Token

To generate a token, click on your avatar at the top right corner of the main Platform menu, then select My Profile from the dropdown menu.

Next, click on the API Tokens tab. Then click the New Token button:

The New Token form will open in a modal window:

While filling out the form, note the following:

  • If the token provides access to a project within which you have PHI data access, it will enable access to that PHI data.

  • If you do not enter an expiration date when creating a token, it will be set to expire in one month.

Once you've completed the form, click Generate Token. A new 32-character token will be generated, and displayed along with a confirmation message.

Be sure to copy your token right away. Once you dismiss the confirmation message or navigate away from the API Tokens screen, the token will no longer be accessible.

Using a Token to Log In

When to Use Tokens

Tokens are useful in a number of different scenarios. Examples include:

  • Logging in via a script - You can incorporate a token into a script to allow the script to log into the Platform.

When incorporating a token into a script, take care to set the token's expiration date such that the script has Platform access for only as long as absolutely necessary. Ensure as well that the script only has access to that project or those projects to which it must have access, in order to function properly.

Revoking a Token

To revoke a token, navigate to the API Tokens screen within your profile on the UI. Select the token you want to revoke, then click the Revoke button:

In the Revoke Tokens Confirmation modal window, click the Yes, revoke it button. The token will be revoked, and its name will no longer appear in the list of tokens on the API Tokens screen.

When to Revoke a Token

  • Token shared too widely - Revoke a token if someone with whom you've shared the token should no longer be able to use it, or if you're not certain who has access to it.

  • Token no longer needed - Revoke a token if a script that uses it is no longer in use, or if a group that had been using it no longer needs access to the Platform, or in any other situation in which the token is no longer necessary.

Logging In Non-Interactively

As a rule, logging in requires interacting directly with the Platform, via the UI or the CLI. But it is possible to log in non-interactively. This is most commonly done via a script that automates both login and project selection.

Two-Factor Authentication

DNAnexus recommends adding two-factor authentication to your account, to provide an extra means of ensuring the security of all data to which you have access, on the Platform.

After enabling two-factor authentication, you will be required to enter a two-factor authentication code to log into the Platform, and to access certain other services. This code is a time-based one-time password that is valid for only a single session. It is generated by a third-party two-factor authenticator application, such as Google Authenticator.

With two-factor authentication protecting your account, your data will be protected even in the case that both your username and password are stolen. No attacker will be able to access your account without the two-factor authentication code.

Enabling Two-Factor Authentication

To enable two-factor authentication, select Account Security from the dropdown menu accessible via your avatar, at the the top right corner of the main menu.

In the Account Security screen, click the button labeled Enable 2FA. Then follow the instructions to select and set up a third-party authenticator application.

If you are unable to use a smartphone application, compatible two-factor authenticator applications, using the TOTP (Time-based One-time Password) algorithm, exist for other platforms.

After enabling two-factor authentication, you will be redirected to a page containing back-up codes. These codes can be used in place of a two-factor authentication code, in the event that you lose access to your authenticator application.

Save the back-up codes in a secure place. Without them, if you lose access to your authenticator application, you will be unable to log into the Platform.

Disabling Two-Factor Authentication

DNAnexus does not recommend disabling two-factor authentication once it has been enabled. If you do need to do so, navigate to the Account Security screen of your profile, then click the Turn Off button in the Two-Factor Authentication section. You will be required to enter your password and a two-factor authentication code to confirm your choice.

If you disable, then re-enable, two-factor authentication, you will need to re-configure your authenticator application. You can do this by scanning a new QR code or entering a new secret key code. You will also be required to save a new set of back-up codes.

To log in via the command-line interface (CLI), make sure you've . From the CLI, enter the command .

See below for directions on .

See the for detail on optional arguments that can be used with dx login.

When using the CLI, log out by entering the command .

Note that if you used a token to log in, logging out invalidates that token. To log in again using a token, you must .

See the for detail on optional arguments that can be used with dx logout.

After fifteen minutes of inactivity, you will be automatically logged out, unless you logged in using an that specifies the length of time you can stay logged in, or are part of an org with a custom autoLogoutAfter policy.

for more information on setting a custom autoLogoutAfter policy for an org.

The token will provide access to each project at the level at which you have access. See the .

To log in with a token via the CLI, enter the command , followed by a valid 32-character token.

Logging in via the CLI when a single sign-on is enabled - If your organization uses , you may not be able to log in via the CLI using a username and password. In this case, use a token to log in via the CLI.

Non-interactive login requires the use of dx login with the --token argument. Use the command to automate project selection. If you prefer not to automate project selection, add the argument to dx login.

DNAnexus recommends using Google Authenticator on your mobile device. Google Authenticator is a popular, free application that's available for both Apple iOS and Android mobile devices. Get it on or from the .

if you lose both your codes and access to your authenticator application.

Contact DNAnexus Support
single sign-on
Google Play
Apple iTunes App Store
Contact DNAnexus Support
using a token to log in
generate a new token
API token
login page
installed the dx command-line client
Projects page for more on project access levels
Logging in and out
Creating a new token
New token form
Revoking a token
dx login
Index of dx Commands page
dx logout
Index of dx Commands page
dx login --token
dx select
--noprojects