Not able to search user with pending invitation

Hi,
I'm on 7.12 self hosted version of Workplace Search and have realised that users who haven't accepted email invitation are not visible anymore on UI. This has happened after update to 7.12 I believe. Now, if I add them again it throws "An invitation already exists with username" which is correct, but there isn't a way for them to use this again. (Even email went to spam and have been deleted now)

Is there a way to delete user via API or something from backend?

Hey @Prateek_Yadav,

Thanks for letting us know about this issue. I'm assuming you're running with Standard auth mode? I've tested this myself now and can confirm there is a bug where existing user invitations enter a broken state as a result of the 7.11->7.12 migration. Additionally, if the invited user clicks the link they were sent, the invite will not work if it was sent before the migration to 7.12 (more on that towards the bottom).

To make the invitations visible and working again, you can issue this update to your Elasticsearch cluster:

POST .ent-search-actastic-workplace_search_invitations/_update_by_query?refresh=true
{
  "script": {
    "source": "ctx._source.frito_pie_organization_id = \"000000000000000000000001\""
  },
  "query": {
    "bool": {
      "must_not": {
        "term": {
          "frito_pie_organization_id": "000000000000000000000001"
        }
      }
    }
  }
}

Now, if a user was invited pre-7.12 and then clicked the invite link after the migration to 7.12 without the above update, my testing shows that the invite will still not work even after correcting the data with the above update. Please let me know if you have users in this state and we should be able to figure out how to get them working again.

I'm going to file a bug report with the team and I expect this to be resolved without the need for a manual update in an upcoming release.

Thanks
Ross

Thanks @ross.bell for the update!!

Yes, I'm on standard auth mode. I have users who were invited pre 7.12 upgrade. I guess running this POST call won't help, right? Slightly confused on the statement below the update command.

Also, I missed to check this update on forum. I updated to 7.13 yesterday assuming this may get resolved :slight_smile:

Hey @Prateek_Yadav,

I don't expect the issue to be resolved in 7.13, although it's still a good idea to upgrade.

The POST call should help most users who were invited before the 7.12 upgrade. However, I suspect there may be an additional issue for any user who actually tried to click on their pre-7.12 upgrade invite after the 7.12 upgrade occurred. Let me know if you have any users who are stuck in that state after issuing the POST call and I can look into a fix while you wait for a patch to get released.

Ross

Hi @ross.bell ,

Updating to 7.13 didn't help. I'll confirm on behavior after running POST call.

Thanks,
Prateek

Hi @ross.bell , after running the POST call, I'm able to see those users on UI who were send invitation before 7.12 upgrade but didn't accept the invite.

Thanks for sharing this.

1 Like