This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem running Powershell Scripts against API

Hi,

 

I am trying to run powershell scripts against the rest api.  I am running scripts from https://community.sophos.com/products/unified-threat-management/f/general-discussion/101289/office365-deployment-best-practice 

When I try the powershell module or any of the scripts I get a 401 error.

 

I have created a new user, given it a static ip and created the API key.

I am able to log in and query using the web api interface.

I have tried with the API key from the Curl command.

 

In the error log I get [ConfdHelper] withConfdConnection Setting StatusUnauthorized: No authentication header found

In the script windows I get Invoke-RestMethod : The remote server returned an error: (401) Unauthorized.

 

Not sure what else to try.

Thanks.



This thread was automatically locked due to age.
Parents Reply Children
No Data