Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-77363

Invite user API does not wait for the user to be created on the site

    XMLWordPrintable

Details

    • 1
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Issue Summary

      Invite user API does not wait for the user to be created on the site

      Steps to Reproduce

      1. Invite a user to the site utilizing the following endpoint

      Add a user from an approved domain or run the API as a site administrator to not trigger an approval flow. 

       
      https://{your-domain}/wiki/api/v2/user/access/invite-by-email
      

      2. Immediately add the same user to a group utilizing the following endpoint

        
      https://your-domain.atlassian.net/wiki/rest/api/group/userByGroupId?groupId={groupId}
      

       

      Actual Results

      • The invite user call will immediately return a 200 OK response code, even if the user is not yet ready on the site.
      • The add member to group call will fail because the user was not fully created on the site yet.
        {"statusCode":500,"message":"com.netflix.hystrix.exception.HystrixRuntimeException: AddUserToGroupsIdentityPlatformCommand failed and no fallback available."}done
        

      Suggestion

      The invite user API should only return the HTTP response code once the user is available on the site. 

      Workaround

      Option 1 : Implement wait time and retry on adding the user to a group.

      Option 2 : Use the Jira API for inviting and adding user to a group.

      POST https://{your-domain}/rest/api/3/user
      POST https://{your-domain}/rest/api/3/group/user?groupId={groupID}
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rmacalinao Ramon M
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: