I have this code which is working fine with user name and password
but if i try and put Client Id and Client Secret while creating CRM Client in below code.
using (CrmServiceClient conn = new CrmServiceClient(oldConnectionString))
it throws an error. User does not have license to use <Modern Project>