SSO Authentication Issue with Duplicate User Entries in spuserexternalid Table

Hi,

Just a heads-up: Occasionally, when a user is created, deleted, and then recreated, they might be registered multiple times in the spuserexternalid table. This can lead to SSO authentication problems.

A quick solution is to manually remove the duplicate entries from the spuserexternalid table. However, for a more permanent fix, it would be beneficial to address this in future updates of the Specify-7 software.

Cheers

Hi Heryk,

Good catch, thank you for letting us know! A report was submitted to GitHub so the developers can review this issue for a future release. Feel free to look this over, Issue #5362, or add any further comments!

– Bronwyn

2 Likes

I just had this issue pop up for a user today, however the same pre-conditions don’t appear to have been met. The user hasn’t been deleted or recreated, which makes me unsure how they would have gotten the second externalid. This is not a new user, however their last login was a few months ago.

{"exception": "MultipleObjectsReturned", "message": "get() returned more than one Spuserexternalid -- it returned 2!"

Looking at the response of /api/spuserexternalid/, I see a duplicate for another user, who also does not appear to have logged in for a few months. This user has also not been deleted and recreated.

2 Likes

Hi Mark, hopefully this gets resolved quickly. Soon, all our users will be using SSO to sign into SP-7 (for security concerns).

1 Like

Hi @markp and @Heryk

Thank you both for your comments! I’ve added @markp’s report to the linked GitHub issue: `Spuserexternalid` table retains record after spuser is deleted · Issue #5362 · specify/specify7 · GitHub

You can remove the duplicate record as mentioned by @heryk to resolve this, but we have noted this and I’ve passed this along to the devs.

2 Likes