The script to correctly set the espace provider and user :
update [dbo].[ossys_Espace] set USER_PROVIDER_NAME = '', USER_PROVIDER_KEY = '' where id = 141 and name = 'XYZ'
update [dbo].[ossys_Espace] set USER_PROVIDER_NAME = '', USER_PROVIDER_KEY = '' where id = 141 and name = 'XYZ'
update [dbo].[ossys_Espace] set USER_PROVIDER_NAME = 'XYZ', USER_PROVIDER_KEY = '4d0e0b5a-2104-404c-a87c-7b83eca89268' where id = 137 and name = 'ABC'
next update the user table to the correct tenant:
select id from ossys_Tenant where name = 'XYZ'
update ossys_User set TENANT_ID = [previously found tenantid] where CHARINDEX('@',username,0) > 0 and tenant_id = 22 (22 = tenantid of users)
Our users generated by our own user provider are stored with an email adress as username so easily distinguishable from the normal users.
next update the user table to the correct tenant:
select id from ossys_Tenant where name = 'XYZ'
update ossys_User set TENANT_ID = [previously found tenantid] where CHARINDEX('@',username,0) > 0 and tenant_id = 22 (22 = tenantid of users)
Our users generated by our own user provider are stored with an email adress as username so easily distinguishable from the normal users.