Hi @Navprabhat
Welcome back to the Auth0 Community!
Unfortunately, as mentioned in this community post with a similar issue to yours, Auth0 does not support account linking with organizations at this time, however there is a backlog item but there is no ETA on when the feature will be implemented.
As a work around for your implementation, you can attempt to link the accounts prior to having any of them being part of an organization or you can add the new user to the organization first then attempt account linking.
Regarding the setPrimaryUser()
, you can review this Knowledge Article on the matter which advises you to se the Organization Login Flow for the application to No Prompt since it is expected behaviour.
If you have any other questions on the matter, feel free to leave a reply.
Kind Regards,
Nik