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

What does user attribute "active" mean and what is it used for?

Marko Schröder January 7, 2019

Hi all,

Bitbucket user data that can be fetched by Atlassian REST api contain an attribute named "active". Until now I did not find any user for whom this attribute was set to false. Even for user ids which are actually inactive (not beeing member of group stash-users and not consuming a licences) attribute "active" is set to true. Is a documentation about user data attributes and their meaning available?

Thanks a lot.

Marko

1 answer

1 accepted

1 vote
Answer accepted
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 8, 2019

Hello Marko,

In order to provide the documentation for a user listed as active, we need to understand where you are seeing this. Can you please provide the API call/URL you are making which is returning the active field?

Once we have this we can find the proper documentation to ensure we can define what the active field is.

Regards,
Stephen Sifers

Marko Schröder January 11, 2019

Hello Stephen,

thank you for your reply. I'm using the REST 1.0 API, e.g. /rest/api/1.0/admin/users?filter=john.smith Response looks like

{
  "size": 1,
  "limit": 25,
  "isLastPage": true,
  "values": [
    {
      "name": "john.smith@mycompany.com",
      "emailAddress": "john.smith@mycompany.com",
      "id": 5394,
      "displayName": "John Smith",
      "active": true,
      "slug": "john.smith_mycompany.com",
      "type": "NORMAL",
      "directoryName": "AD mycompany",
      "deletable": false,
      "lastAuthenticationTimestamp": 1546604330944,
      "mutableDetails": false,
      "mutableGroups": true,
      "links": {
        "self": [
          {
            "href": "https://bitbucket.mycompany.com/users/john.smith_mycompany.com"
          }
        ]
      }
    }
  ],
  "start": 0
}

The "active" attribute, I'm asking for, is marked bold above.

Thank you for your assistance.

Marko

Like # people like this
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 11, 2019

Hello again Marko,

Thank you for the response which include the API endpoint. This was a log of fun to dig around and find the answer. What I found is that the “active” field is for the user being enabled. Simple Enough right? Well, not exactly. Here are my full findings:

If a user exists within the Bitbucket directory, they will be listed as active. If the user is removed from the Bitbucket directory, then will no longer be displayed within the UI. They will also be removed from the database (this is important for later). The user will no longer display within API calls.

If a user exists within a Crowd directory, this will be listed as active. If you remove the active box from the user within Crowd, they are removed from accessing Bitbucket. The user will no longer display within API calls. However, the user will remain within the database (important for later).

Now, we know if we delete a user they are removed, and if a user is revoked from access within Crowd they are removed. But what about the database? So, we tested there next. We checked the database and there is a column for “is_active” and within there the field is either set to T or F. What we found is if you’re using an external directory with Bitbucket, and a user is revoked from access or disabled then the user will stay present within the database and their “is_active” column will be updated to (f)false. The user will then no long display within the admin/user endpoint but will still be within the database as “is_active” False.

TL;DR : The active status is the status of the user. API calls will only show users which have access to the API, and not all users within the database. You will always see users as active within API calls. The database will tell a different story.

I hope this helps clarify what the active field means and does within Bitbucket.

Regards,
Stephen Sifers

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events