mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-16 07:17:24 +00:00
Fix
This commit is contained in:
parent
8d45fba6d4
commit
9c9d0cf1fd
@ -21,7 +21,7 @@ In this section we share Power BI query sample to run a query using application
|
||||
|
||||
If you want to use user token instead please refer to [this](run-advanced-query-sample-power-bi-user-token.md) tutorial.
|
||||
|
||||
>**Prerequisite**: You first need to [create an app](exposed-apis-create-app-webapp).
|
||||
>**Prerequisite**: You first need to [create an app](exposed-apis-create-app-webapp.md).
|
||||
|
||||
## Run a query
|
||||
|
||||
@ -45,7 +45,7 @@ If you want to use user token instead please refer to [this](run-advanced-query-
|
||||
AppSecret = "22222222-2222-2222-2222-222222222222", // Paste your own app secret here
|
||||
Query = "MachineInfo | where EventTime > ago(7d) | summarize EventCount=count(), LastSeen=max(EventTime) by MachineId", // Paste your own query here
|
||||
|
||||
ResourceAppIdUrl = "https://securitycenter.onmicrosoft.com/windowsatpservice",
|
||||
ResourceAppIdUrl = "https://api.securitycenter.windows.com",
|
||||
OAuthUrl = Text.Combine({"https://login.windows.net/", TenantId, "/oauth2/token"}, ""),
|
||||
|
||||
Resource = Text.Combine({"resource", Uri.EscapeDataString(ResourceAppIdUrl)}, "="),
|
||||
|
@ -21,7 +21,7 @@ In this section we share Power BI query sample to run a query using user token.
|
||||
|
||||
If you want to use application token instead please refer to [this](run-advanced-query-sample-power-bi-app-token.md) tutorial.
|
||||
|
||||
>**Prerequisite**: You first need to [create an app](exposed-apis-create-app-nativeapp).
|
||||
>**Prerequisite**: You first need to [create an app](exposed-apis-create-app-nativeapp.md).
|
||||
|
||||
## Run a query
|
||||
|
||||
|
@ -40,7 +40,7 @@ $tenantId = '00000000-0000-0000-0000-000000000000' # Paste your own tenant ID he
|
||||
$appId = '11111111-1111-1111-1111-111111111111' # Paste your own app ID here
|
||||
$appSecret = '22222222-2222-2222-2222-222222222222' # Paste your own app secret here
|
||||
|
||||
$resourceAppIdUri = 'https://securitycenter.onmicrosoft.com/windowsatpservice'
|
||||
$resourceAppIdUri = 'https://api.securitycenter.windows.com'
|
||||
$oAuthUri = "https://login.windows.net/$TenantId/oauth2/token"
|
||||
$body = [Ordered] @{
|
||||
resource = "$resourceAppIdUri"
|
||||
|
@ -37,7 +37,7 @@ appSecret = '22222222-2222-2222-2222-222222222222' # Paste your own app secret h
|
||||
|
||||
url = "https://login.windows.net/%s/oauth2/token" % (tenantId)
|
||||
|
||||
resourceAppIdUri = 'https://securitycenter.onmicrosoft.com/windowsatpservice'
|
||||
resourceAppIdUri = 'https://api.securitycenter.windows.com'
|
||||
|
||||
body = {
|
||||
'resource' : resourceAppIdUri,
|
||||
|
Loading…
x
Reference in New Issue
Block a user