-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete linked user from User pool users. #3431
Comments
I stumbled into this too: I found I could delete the user via the Cognito API (or AWS CLI). Whats odd is that even though linked users show the same |
@lenarmazitov - Can you please clarify - do you know that the second user still exists, but just cannot be retrieved? Or does it appear that the linked user is deleted along with its related record? |
@haverchuck I could just suppose that user does not exists, but some link to second federated identity is still remains. And when I click on it in AWS console I can not reach original user, because it was deleted. update I have just checked. User is still exists, and I can link new identity to it. So I suppose that when I remove user in AWS console with 2 or more identities linked to then all identities will be unlinked from it, but identities still present in database and we can see it in AWS console. And my thoughts how this can be fixed
|
Same here, but I can't even delete it with adminDeleteUser from JS SDK, throws a UserNotFoundException. In Cognito User Pool console the user appears though, it also appears with listUser filtered by its username. I haven't found a way to remove that user, any thoughts? |
Hi @haverchuck, in my case the user can be retrieved by list-users (both SDK and CLI) and is listed in the console as well. However I can't geit it with admin-get-user not admin-delete-user: "An error occurred (UserNotFoundException) when calling the AdminDeleteUser operation: User does not exist." |
How did you delete the user via aws cli? When I try all I get is: "An error occurred (UserNotFoundException) when calling the AdminDeleteUser operation: User does not exist." |
Has anyone had success with this? Still an issue, and now I've got unlinked orphaned accounts that I cannot access in the console or CLI, though the user shows in both the console |
If you want to delete these unlinked external/provider accounts, do the following:
|
@codeitcody I'm currently running Admin Link Provider in the pre signup trigger After successful linking, I end up with two users with different sub and additionally the UserPassUser now has an "identity" field that contains the Google user data. How do I link then to get the same sub? |
@shiyaskk , I too encountered the same issue. when I pass SAML IDP user as a source user and Cognito native user as a destination user. |
Note that this can also happen if you make a mistake in the link command. When linking to existing User Pool users make sure to use the "sub", not the email, of the user as username:
(Note that this command links the Google user to the local user pool user, so that when the Google user would federate in, he/she would "assume" the account of the user pool user.) @MJRuskin is right that to correct the "user not found" situation you just have to create the link in a valid way again. Either to a new user (just for the purpose of throwing away again later) or to an existing one. Use the user that is "not found" as source user then, and the new/existing user as destination user. Another note: if you do the linking entirely right you would not see multiple user accounts for the same user in Cognito. You would just see one (although it can work with multiple so it is not a real problem). You can do the linking beforehand; when you just have the Cognito user pool user record showing, not the federated one yet. However, to do the linking then though you would need to know the user's ID from the federation provider, which for e.g. Google is impossible to predict (it is some number), but for SAML users it can be predicted (it is their common organization ID that you may know). |
Cognito has recently resolved an issue with linking federated users to an existing user profile in Cognito User Pools. As a result, your Amplify application can now merge user identities from 3rd party social identity providers to a Cognito user in a user pool using the Pre sign-up Lambda trigger. You can use the
We will work on resources to share with you to explain how to integrate this feature into your Amplify app. |
Following up here - with the way |
As this is pretty similar to #5104 , i'll go ahead and close it out - please follow up with any questions you have on that issue. Thanks! |
Describe the bug
When I link user to existing identity via adminLinkProviderForUser, I get two users in "Users and groups" section in AWS console. It is ok, because second user is just link to original one.
But when I delete one of that I have just created, I can not reach remaining one. I get this instead:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I should have ability to remove both.
The text was updated successfully, but these errors were encountered: