function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Babar Hussain 4Babar Hussain 4 

Duplicate Accounts

Hi Friends,
I'm creating a new user in the production, But I'm getting error like

Error: This Federation ID is already in use. Use a different Federation ID.

My question is how to find duplicate Federation ID using SOQL query 

Can anyone help on this and share the SOQL query to me.

Best Answer chosen by Babar Hussain 4
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

You can use that in the same way.
 
SELECT Id, FederationIdentifier FROM User where FederationIdentifier='23098'

Let me know if you face any issues.

Thanks,
 

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Babar,

You can just query the user object with filter as    "FederationIdentifier" as below

Replace the Kumar with your federationid which you are trying to add
SELECT Id, FederationIdentifier FROM User where FederationIdentifier='kumar'

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
Babar Hussain 4Babar Hussain 4
I already tried this one, But I couldn't found, I need to match Id not by name, because he used different name. So I need query to find 23098 this
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Babar,

You mean you have 23098 as FederationIdentifier?

Thanks,
 
Babar Hussain 4Babar Hussain 4
yes
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

You can use that in the same way.
 
SELECT Id, FederationIdentifier FROM User where FederationIdentifier='23098'

Let me know if you face any issues.

Thanks,
 
This was selected as the best answer
Babar Hussain 4Babar Hussain 4
It's Worked thanks 
Babar Hussain 4Babar Hussain 4
Thanks for the great help