Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get user which are not granted acces permission on jira on database.

Hello,

 

I need to get users which are not active in database.  On the column cwd_user.active I got a user with 1 value even though is not active on application. He can not login. Why he has this 1 value?

 

I made the following for active user: But i need a query also for active with not acces on jira

 

 

SELECT DISTINCT cwd_user.lower_user_name,cwd_user.lower_first_name,cwd_user.last_name,cwd_user.created_date,cwd_user.updated_date,cwd_user.active AS user_status,

GROUP_CONCAT(cwd_membership.parent_name) AS GRUPURI

FROM   cwd_user

       JOIN cwd_membership

         ON cwd_user.id = cwd_membership.child_id

            AND cwd_user.directory_id = cwd_membership.directory_id

       JOIN licenserolesgroup

         ON Lower(cwd_membership.parent_name) = Lower(licenserolesgroup.group_id)

       JOIN cwd_directory

         ON cwd_membership.directory_id = cwd_directory.id

WHERE 

         cwd_directory.active = '1'

       AND

               cwd_user.active = '1' and

      license_role_name = 'jira-software'

      GROUP BY cwd_user.user_name

 

 

1 answer

0 votes

I'm afraid it's a bit more complex that the SQL you've generated here.  And it's even harder because you cannot search for a negative - people who do not have access may not be in your database in a way you can recognise or report on.

Take your "can not log in" - what application access does that person have?  The 1 means a potentially active account, but that's not the only thing that says they can log in.  They could be being rejected in one of several ways.

You need something more understanding of the data than SQL if you really want this sort of report, but I'd actually skip it.

Why are you looking for users who have no access?  They can't log in, they don't count towards your licences, and there's not really any reason to just simply ignore them that I can think of (until you hook your system up to a directory system with a very large number of people you don't need to know about and forget to restrict the range, but that's a cleaning up exercise)

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you