Uploaded image for project: 'Identity'
  1. Identity
  2. ID-8573

Endpoint "Search for users within an organization" returns intermittent 504 gateway timeout

      Issue Summary

      When using the new experimental endpoint Search for users within an organization that was released for the Organizations REST API, frequent timeouts can occur.

      Steps to Reproduce

      Send a POST with a JSON payload that combines the emailUsernames and emailDomains parameters to search for a user from a specific domain: 

      {
          "emailUsernames": {
              "eq": ["john.doe"]
          },
          "emailDomains": {
              "eq": [
                  "mydomain.com"
              ]
          },
          "expand": ["NAME", "EMAIL"],
          "limit": 20
      } 

      Expected Results

      The user should be returned without any issues. 

      Actual Results

      While the query usually works, very frequently a 504 gateway timeout occurs after 15 seconds. 

      The issue happens more frequently when using "eq". When using "contains", the timeouts are not that frequent but they do take some time (around 9s) to be processed, depending on the amount of users in the user base. 

      Workaround

      Please retry the API call or implement a retry mechanism to handle the timeout if you are calling this endpoint from a script. 

            [ID-8573] Endpoint "Search for users within an organization" returns intermittent 504 gateway timeout

            SET Analytics Bot made changes -
            Support reference count Original: 4 New: 5
            SET Analytics Bot made changes -
            Support reference count Original: 3 New: 4
            Jimmy Bell made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 947897 ]
            Jimmy Bell made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 947484 ]

            Seems there was a change, but the search still takes 10 secs (if searched as in the description), which is too long for automation scripts. The index seems to be still missing.

            The API is great if you search for an Atlassian ID, giving a lot of information needed by ORG admin / automation.

            But we need a well-performing search for email addresses:

            • The search as above is too slow
            • The other option mentioned in the docs to search with "eq" is broken
            • The search via Jira API is broken as in JRACLOUD-82374 

            So I really do not know who to reliably search for a users in the ORG if I only have the email address. Please fix this as announced.

            Bruno Abele added a comment - Seems there was a change, but the search still takes 10 secs (if searched as in the description), which is too long for automation scripts. The index seems to be still missing. The API is great if you search for an Atlassian ID, giving a lot of information needed by ORG admin / automation. But we need a well-performing search for email addresses: The search as above is too slow The other option mentioned in the docs to search with "eq" is broken The search via Jira API is broken as in JRACLOUD-82374   So I really do not know who to reliably search for a users in the ORG if I only have the email address. Please fix this as announced.
            SET Analytics Bot made changes -
            Support reference count Original: 2 New: 3
            Cole Norman made changes -
            Labels New: guard-s7
            xiaji made changes -
            Development Effort New: S [ 13031 ]
            Preventable by New: Pre-deployment testing,Soaking [ 19131, 19132 ]
            Was this caused by a recent change? New: No [ 19032 ]
            Status Original: Needs Triage [ 10030 ] New: Short Term Backlog [ 12074 ]

            xiaji added a comment -

            Index is missing for the search and I'll add a quick ticket in our backlog for the fix.

            xiaji added a comment - Index is missing for the search and I'll add a quick ticket in our backlog for the fix.
            xiaji made changes -
            Assignee New: xiaji [ e5fdffa058ad ]

              e5fdffa058ad xiaji
              bd4a89fcb3fe Renan Andrade
              Affected customers:
              0 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated: