title: Get All User Roles in DNN
body: <pre><code>public DnnRole GetDnnRoleByName(int portalId, string dnnRoleName)
          {
              DnnRole role = null;
              try
              {                
                  RoleController rc = new RoleController();
                  RoleInfo dnnRole = rc.GetRoleByName(portalId, dnnRoleName);
  
                  if (dnnRole != null)
                  {
                      role = new DnnRole();
                      role.Id = dnnRole.RoleID;
                      role.RoleName = dnnRole.RoleName;
                      role.Description = dnnRole.Description;
  
                  }
              }
  </code></pre>
  
  <p>Above is my code to get the Roles for many purposes and this DNN predefined method. But when I try to get the Role ID for <strong>All Users</strong>(DNN default role) it gives a error. Because this role does not has portal Id. Can you please advice is there any way to get this with out hard code the role id.</p>