mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-06-25 15:23:40 +00:00
API pages update
1. Adding US Gov reference to all pages with URIs. 2. Adding geo reference to all pages with URIs. 3. Replace MDE URLs ending with "windows.com" with "microsoft.com". 4. Replace the login endpoint from "login.windows.net" to "login.microsoftonline.com".
This commit is contained in:
@ -203,7 +203,7 @@ Here is an example return value:
|
||||
The following code examples demonstrate how to obtain an access token for calling the Microsoft Defender for Endpoint SIEM API.
|
||||
|
||||
```csharp
|
||||
AuthenticationContext context = new AuthenticationContext(string.Format("https://login.windows.net/{0}", tenantId));
|
||||
AuthenticationContext context = new AuthenticationContext(string.Format("https://login.microsoftonline.com/{0}", tenantId));
|
||||
ClientCredential clientCredentials = new ClientCredential(clientId, clientSecret);
|
||||
AuthenticationResult authenticationResult = context.AcquireTokenAsync(detectionsResource, clientCredentials).GetAwaiter().GetResult();
|
||||
```
|
||||
@ -218,7 +218,7 @@ $appId = '' ### Paste your Application ID here
|
||||
$appSecret = '' ### Paste your Application secret here
|
||||
|
||||
$resourceAppIdUri = 'https://graph.windows.net'
|
||||
$oAuthUri = "https://login.windows.net/$tenantId/oauth2/token"
|
||||
$oAuthUri = "https://login.microsoftonline.com/$tenantId/oauth2/token"
|
||||
$authBody = [Ordered] @{
|
||||
resource = "$resourceAppIdUri"
|
||||
client_id = "$appId"
|
||||
@ -237,7 +237,7 @@ tenantId='' ### Paste your tenant ID here
|
||||
appId='' ### Paste your Application ID here
|
||||
appSecret='' ### Paste your Application secret here
|
||||
resourceAppIdUri='https://graph.windows.net'
|
||||
oAuthUri="https://login.windows.net/$tenantId/oauth2/token"
|
||||
oAuthUri="https://login.microsoftonline.com/$tenantId/oauth2/token"
|
||||
scriptDir=$(pwd)
|
||||
|
||||
apiResponse=$(curl -s X POST "$oAuthUri" -d "resource=$resourceAppIdUri&client_id=$appId&client_secret=$appSecret&\
|
||||
|
Reference in New Issue
Block a user