Start a conversation

Getting a list of all users in a DNN instance using SQL

Overview

If you would like to get a list of users who had logins for the site, you can export all users on your site using a simple SQL query run through the SQL Console.

 

Solution

  1. Log in to a SuperUser Account.
  2. Go to Persona Bar > Settings > SQL Console
  3. Run the following SQL query, replacing the # with your desired PortalId:
    • SELECT users.userid
              ,users.username
              ,users.email
              ,roles.rolename
      FROM userportals
      INNER JOIN users ON userportals.userid = users.userid
      INNER JOIN userroles ON userportals.userid = userroles.userid
      INNER JOIN roles ON userroles.roleid = roles.roleid
      WHERE userportals.portalid = #
  4. When the results are displayed, you can press the Export button (see attached image) and select which type of file you want the results exported to.

sqlconsole.jpg

 

 

 

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted a month ago
  3. Updated 23 days ago

Comments