I want to fetch the SCOM alerts data. But I keep getting the error 401. I am passing the credentials right
问题 My script looks like import requests import base64 user="domain\\username" pass="password" Authentication_mode="Windows" tok=Authentication_mode+":"+user+":"+pass #referring the doc for authentication at https://docs.microsoft.com/en-us/rest/api/operationsmanager/authentication/login token=base64.b64encode(bytes(token,'utf-8')).decode() headers={'content-type':'application/json', 'Authorization': 'Basic %s' % token } payload={} url="http://<Servername>/OperationsManager/authenticate" respone