When assigning a profile to a new machine in Software management you receive an error :
Could not assign profile because it is currently using Patch Management.
The referenced machines are not disabled from Patch management.
Disconnect from Patch management.
If this step gives you the below error, you will have to remove the patch policies associated with it.
This machine cannot be disconnected from patch management until the machine's organization and machine group are no longer referenced in a Patch Management Policy in Policy Management
This is found under Patch management> Patch Policy > Membership.
You can also run this sql query to find out the which patch management settings have been assigned to the machines.
Use this query to get the admin id :
select * from adminIdTab where adminName = 'yourlogonname'