You want to manage Endpoint Protection Manager (SEPM) using REST API with PowerShell.
You have run the PowerShell SEPM Authentication script successfully and received the token. Now, when you try to run the other scripts using the token received during Endpoint Protection Manager (SEPM) authentication, you get an error message as The remote server returned an error: (401) Unauthorized.
Release : 14.3.x
You are using Administrator account and not System Administrator account of Endpoint Protection Manager (SEPM) while running the SEPM_Authentication PowerShell script.
Administrator account has limited access that causes the script execution failure with error message as Unauthorized. Administrator account with Rights as "Not authorized to manage this site" or "Authorized to manage this site" will still receive same error.
You need Endpoint Protection Manager (SEPM) System Administrator account access to execute the script successfully.
Reference link for downloading the REST API scripts : https://knowledge.broadcom.com/external/article/179015/endpoint-protection-14-rest-api-and-powe.html