Hi vivek
There is a way to do this which involves getting the users to reconcile their community profile when they log in with SSO. I've done this before with one of our communities that started off separate and was brough into our SSO solution after a while.
You'll need to speak to your account manager to discuss the implementation, but there is a way to set this up for users hitting the community to reconcile (link) their community account to either an existing SSO account or create a new SSO account for it which then ties up the SSO ID.
I'm not aware of an API call you can use to modify this however this is one to retrieve a users SSO ID from their community profile, as mentioned above you can also manually edit the users but depending on the number of users this can be tedious and a lot of work.