In NSM when a firewall is not getting acquired due to the error "Acquisition Failed, unexpected response status code 401", do the following to fix the issue:
1. Login to the Firewall locally.
2. Go to Device/Settings/Administration/SonicOS API and look for “Session security using RFC-7616 Digest authentication”. If it is enabled, Disable it. By default this option is disabled on any Gen7 firewall.

3. As soon as this option is disabled, the firewall will get successfully acquired in NSM. If not then try a manual sync from NSM.