Azure Sentinel Rest API-添加数据连接器
我正在进行一个项目,需要我的应用程序将Office 365数据连接器添加到Azure Sentinel。我使用的是Azure管理REST API,可以在这里找到 我已经设法连接到Azure REST API的其他方面,但似乎无法创建一个连接器,运行下面的。我最后遇到了一个401错误: 代码: 还有谁见过这个吗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
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'))