【问题标题】:How do i query Azure Security Center SecureScore through Graph API?如何通过 Graph API 查询 Azure 安全中心 SecureScore?
【发布时间】:2019-11-20 10:56:40
【问题描述】:

我正在尝试访问 Microsoft Graph API 以获取 Azure 安全中心的 secureScore,但我无法找到为我提供此信息的端点。 我可以通过https://graph.microsoft.com/beta/security/secureScores 轻松找到 Office 365 的secureScore,但这并没有为我提供 Azure 的。

我正在使用应用注册对 Graph 进行身份验证。 这是用于获取 Office 365 的 secureScore 的代码:

#Assign the Client/Application ID, Client Secret and Tenant Domain
$ClientID = 'CLIENTID'
$ClientSecret = 'CLIENTSECRET'
$tenantdomain = 'TENANTNAME.onmicrosoft.com'

$loginURL = "https://login.microsoft.com"
$resource = "https://graph.microsoft.com"
$body       = @{grant_type="client_credentials";resource=$resource;client_id=$ClientID;client_secret=$ClientSecret}
$oauth      = Invoke-RestMethod -Method Post -Uri $loginURL/$tenantdomain/oauth2/token?api-version=1.0 -Body $body

$headerParams = @{'Authorization'="$($oauth.token_type) $($oauth.access_token)"}
[uri]$uriGraphEndpoint = "https://graph.microsoft.com/beta/security/secureScores"
$response = Invoke-RestMethod -Method Get -Uri $uriGraphEndpoint.AbsoluteUri -Headers $headerParams

谁能指出我正确的方向?

【问题讨论】:

    标签: microsoft-graph-api azure-ad-graph-api


    【解决方案1】:

    目前不支持通过 Graph API 或 ASC Rest API 获取 ASC SecureScore。

    Azure 门户上的数据来自内部 API,不推荐使用。

    您可以在Azure Security Center User Voice 上发布您的想法,以引起 MS 产品组的注意。

    【讨论】:

    • 嗨,艾伦,谢谢,我会在用户语音网站上发布这个想法 :)
    猜你喜欢
    • 2021-10-15
    • 1970-01-01
    • 1970-01-01
    • 2015-11-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多