Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure Sentinel Rest API-添加数据连接器_Azure_Azure Sentinel - Fatal编程技术网

Azure Sentinel Rest API-添加数据连接器

Azure Sentinel Rest API-添加数据连接器,azure,azure-sentinel,Azure,Azure Sentinel,我正在进行一个项目,需要我的应用程序将Office 365数据连接器添加到Azure Sentinel。我使用的是Azure管理REST API,可以在这里找到 我已经设法连接到Azure REST API的其他方面,但似乎无法创建一个连接器,运行下面的。我最后遇到了一个401错误: 代码: 还有谁见过这个吗 api_url = ('{0}subscriptions/{1}/resourceGroups/{2}/providers/Microsoft.OperationalInsights/wo

我正在进行一个项目,需要我的应用程序将Office 365数据连接器添加到Azure Sentinel。我使用的是Azure管理REST API,可以在这里找到

我已经设法连接到Azure REST API的其他方面,但似乎无法创建一个连接器,运行下面的。我最后遇到了一个401错误:

代码:

还有谁见过这个吗

api_url = ('{0}subscriptions/{1}/resourceGroups/{2}/providers/Microsoft.OperationalInsights/workspaces/{3}/providers/Microsoft.SecurityInsights/dataConnectors/{4}?api-version=2020-01-01').format(az_url_mgt, subscription_id, resourceGroupName, workbook, connector)
        
headers = {'Authorization': ('Bearer ' + access_token)}
response = requests.put(api_url, data=json, headers=headers)

return json.loads(response.content.decode('utf-8'))