Skip to content

Commit a43af0a

Browse files
authored
Merge pull request #229646 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/azure-docs (branch main)
2 parents 8fa4a14 + d0ed1ab commit a43af0a

File tree

8 files changed

+62
-15
lines changed

8 files changed

+62
-15
lines changed

articles/active-directory/develop/tutorial-v2-windows-uwp.md

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.service: active-directory
99
ms.subservice: develop
1010
ms.topic: tutorial
1111
ms.workload: identity
12-
ms.date: 12/13/2019
12+
ms.date: 03/03/2023
1313
ms.author: henrymbugua
1414
ms.reviewer: jmprieur
1515
ms.custom: "devx-track-csharp, aaddev, identityplatformtop40"
@@ -108,6 +108,7 @@ This section shows how to use the Microsoft Authentication Library to get a toke
108108
```csharp
109109
using Microsoft.Identity.Client;
110110
using Microsoft.Graph;
111+
using Microsoft.Graph.Models;
111112
using System.Diagnostics;
112113
using System.Threading.Tasks;
113114
using System.Net.Http.Headers;
@@ -152,7 +153,7 @@ This section shows how to use the Microsoft Authentication Library to get a toke
152153
GraphServiceClient graphClient = await SignInAndInitializeGraphServiceClient(scopes);
153154

154155
// Call the /me endpoint of Graph
155-
User graphUser = await graphClient.Me.Request().GetAsync();
156+
User graphUser = await graphClient.Me.GetAsync();
156157

157158
// Go back to the UI thread to make changes to the UI
158159
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
@@ -236,6 +237,42 @@ Eventually, the `AcquireTokenSilent` method fails. Reasons for failure include a
236237

237238
### Instantiate the Microsoft Graph Service Client by obtaining the token from the SignInUserAndGetTokenUsingMSAL method
238239

240+
In the project, create a new file named *TokenProvider.cs*: right-click on the project, select **Add** > **New Item** > **Blank Page**.
241+
242+
Add to the newly created file the following code:
243+
244+
```csharp
245+
using Microsoft.Kiota.Abstractions.Authentication;
246+
using System;
247+
using System.Collections.Generic;
248+
using System.Threading;
249+
using System.Threading.Tasks;
250+
251+
namespace UWP_app_MSGraph {
252+
public class TokenProvider : IAccessTokenProvider {
253+
private Func<string[], Task<string>> getTokenDelegate;
254+
private string[] scopes;
255+
256+
public TokenProvider(Func<string[], Task<string>> getTokenDelegate, string[] scopes) {
257+
this.getTokenDelegate = getTokenDelegate;
258+
this.scopes = scopes;
259+
}
260+
261+
public Task<string> GetAuthorizationTokenAsync(Uri uri, Dictionary<string, object> additionalAuthenticationContext = default,
262+
CancellationToken cancellationToken = default) {
263+
return getTokenDelegate(scopes);
264+
}
265+
266+
public AllowedHostsValidator AllowedHostsValidator { get; }
267+
}
268+
}
269+
```
270+
271+
> [!TIP]
272+
> After pasting the code, make sure that the namespace in the *TokenProvider.cs* file matches the namespace of your project. This will allow you to more easily reference the `TokenProvider` class in your project.
273+
274+
The `TokenProvider` class defines a custom access token provider that executes the specified delegate method to get and return an access token.
275+
239276
Add the following new method to *MainPage.xaml.cs*:
240277

241278
```csharp
@@ -245,16 +282,22 @@ Add the following new method to *MainPage.xaml.cs*:
245282
/// <returns>GraphServiceClient</returns>
246283
private async static Task<GraphServiceClient> SignInAndInitializeGraphServiceClient(string[] scopes)
247284
{
248-
GraphServiceClient graphClient = new GraphServiceClient(MSGraphURL,
249-
new DelegateAuthenticationProvider(async (requestMessage) =>
250-
{
251-
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("bearer", await SignInUserAndGetTokenUsingMSAL(scopes));
252-
}));
285+
var tokenProvider = new TokenProvider(SignInUserAndGetTokenUsingMSAL, scopes);
286+
var authProvider = new BaseBearerTokenAuthenticationProvider(tokenProvider);
287+
var graphClient = new GraphServiceClient(authProvider, MSGraphURL);
253288

254289
return await Task.FromResult(graphClient);
255290
}
256291
```
257292

293+
In this method, you're using the custom access token provider `TokenProvider` to connect the `SignInUserAndGetTokenUsingMSAL` method to the Microsoft Graph .NET SDK and create an authenticated client.
294+
295+
To use the `BaseBearerTokenAuthenticationProvider`, in the *MainPage.xaml.cs* file, add the following reference:
296+
297+
```cs
298+
using Microsoft.Kiota.Abstractions.Authentication;
299+
```
300+
258301
#### More information on making a REST call against a protected API
259302

260303
In this sample application, the `GetGraphServiceClient` method instantiates `GraphServiceClient` by using an access token. Then, `GraphServiceClient` is used to get the user's profile information from the **me** endpoint.

articles/active-directory/saas-apps/ms-confluence-jira-plugin-adminguide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ The following image shows the configuration screen in both Jira and Confluence:
130130
| 1.0.20 | Bug Fixes: | Jira Core and Software: |
131131
| | JIRA SAML SSO add-on redirects to incorrect URL from mobile browser. | 7.0.0 to 9.5.0 |
132132
| | The mark log section after enabling the JIRA plugin. | |
133-
| | The last login date for a user doesn't update when user signs in via SSO | |
133+
| | The last login date for a user doesn't update when user signs in via SSO. | |
134134
| | | |
135135
| 1.0.19 | New Feature: | Jira Core and Software: |
136136
| | Application Proxy Support - Checkbox on the configure plugin screen to toggle the App Proxy mode so as to make the Reply URL editable as per the need to point the App Proxy mode so as to make the Reply URL editable as per the need to point it to the proxy server URL | 6.0 to 9.3.1 |

articles/azure-monitor/agents/data-collection-text-log.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ To create the data collection rule in the Azure portal:
285285
See [Structure of a data collection rule in Azure Monitor (preview)](../essentials/data-collection-rule-structure.md#custom-logs) if you want to modify the text log DCR.
286286

287287
> [!IMPORTANT]
288-
> Custom data collection rules have a suffix of *Custom-*; for example, *Custom-rulename*. The *Custom-rulename* in the stream declaration must match the *Custom-rulename* name in the Log Analytics workspace.
288+
> Custom data collection rules have a prefix of *Custom-*; for example, *Custom-rulename*. The *Custom-rulename* in the stream declaration must match the *Custom-rulename* name in the Log Analytics workspace.
289289

290290
1. Select **Save**.
291291

@@ -457,4 +457,4 @@ Learn more about:
457457

458458
- [Azure Monitor Agent](azure-monitor-agent-overview.md).
459459
- [Data collection rules](../essentials/data-collection-rule-overview.md).
460-
- [Best practices for cost management in Azure Monitor](../best-practices-cost.md).
460+
- [Best practices for cost management in Azure Monitor](../best-practices-cost.md).

articles/dms/tutorial-sql-server-to-managed-instance.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ To complete this tutorial, you need to:
8181

8282
> [!NOTE]
8383
> - Azure Database Migration Service does not support using an account level SAS token when configuring the Storage Account settings during the [Configure Migration Settings](#configure-migration-settings) step.
84-
> - You can't use an Azure Storage account that has a private endpoint with Azure Database Migration Service.
85-
84+
85+
- Ensure both the Azure Database Migration Service IP address and the Azure SQL Managed Instance subnet can communicate with the blob container.
86+
8687
[!INCLUDE [resource-provider-register](../../includes/database-migration-service-resource-provider-register.md)]
8788

8889
[!INCLUDE [instance-create](../../includes/database-migration-service-instance-create.md)]

articles/iot-central/core/howto-query-with-rest-api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Every IoT Central REST API call requires an authorization header. To learn more,
2828

2929
For the reference documentation for the IoT Central REST API, see [Azure IoT Central REST API reference](/rest/api/iotcentral/).
3030

31+
> [!NOTE]
32+
> The support for property queries is being deprecated from the IoT Central REST API and we will soon remove this from the existing API releases.
33+
3134
[!INCLUDE [iot-central-postman-collection](../../../includes/iot-central-postman-collection.md)]
3235

3336
To learn how to query devices by using the IoT Central UI, see [How to use data explorer to analyze device data.](../core/howto-create-analytics.md)

articles/sentinel/sap/prerequisites-for-deploying-sap-continuous-threat-monitoring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ To successfully deploy the Microsoft Sentinel solution for SAP® applications, y
5959
| Prerequisite | Description |
6060
| ---- | ----------- |
6161
| **Supported SAP versions** | The SAP data connector agent support SAP NetWeaver systems and was tested on [SAP_BASIS versions 731](https://support.sap.com/en/my-support/software-downloads/support-package-stacks/product-versions.html#:~:text=SAP%20NetWeaver%20%20%20%20SAP%20Product%20Version,%20%20SAPKB710%3Cxx%3E%20%207%20more%20rows) and above. <br><br>Certain steps in this tutorial provide alternative instructions if you're working on the older [SAP_BASIS version 740](https://support.sap.com/en/my-support/software-downloads/support-package-stacks/product-versions.html#:~:text=SAP%20NetWeaver%20%20%20%20SAP%20Product%20Version,%20%20SAPKB710%3Cxx%3E%20%207%20more%20rows). |
62-
| **Required software** | SAP NetWeaver RFC SDK 7.50 ([Download here](https://aka.ms/sentinel4sapsdk))<br>Make sure that you also have an SAP user account in order to access the SAP software download page. Subject to SAP terms and conditions |
62+
| **Required software** | SAP NetWeaver RFC SDK 7.50 ([Download here](https://aka.ms/sentinel4sapsdk))<br>Make sure that you also have an SAP user account in order to access the SAP software download page. |
6363
| **SAP system details** | Make a note of the following SAP system details for use in this tutorial:<br>- SAP system IP address and FQDN hostname<br>- SAP system number, such as `00`<br>- SAP System ID, from the SAP NetWeaver system (for example, `NPL`) <br>- SAP client ID, such as `001` |
6464
| **SAP NetWeaver instance access** | The SAP data connector agent uses one of the following mechanisms to authenticate to the SAP system: <br>- SAP ABAP user/password<br>- A user with an X.509 certificate (This option requires additional configuration steps) |
6565

articles/virtual-machines/dcasv5-dcadsv5-series.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ This series supports Standard SSD, Standard HDD, and Premium SSD disk types. Bil
7373
- [Premium Storage](premium-storage-performance.md)
7474
- [Premium Storage caching](premium-storage-performance.md)
7575
- [VM Generation 2](generation-2.md)
76+
- [Ephemeral OS Disks](ephemeral-os-disks.md)
7677

7778
*Unsupported* features in DCadsv5-series VMs:
7879

7980
- [Live Migration](maintenance-and-updates.md)
8081
- [Memory Preserving Updates](maintenance-and-updates.md)
8182
- [Accelerated Networking](../virtual-network/create-vm-accelerated-networking-cli.md)
82-
- [Ephemeral OS Disks](ephemeral-os-disks.md)
8383

8484
### DCadsv5-series products
8585

articles/virtual-machines/ecasv5-ecadsv5-series.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ This series supports Standard SSD, Standard HDD, and Premium SSD disk types. Bil
7676
- [Premium Storage](premium-storage-performance.md)
7777
- [Premium Storage caching](premium-storage-performance.md)
7878
- [VM Generation 2](generation-2.md)
79+
- [Ephemeral OS Disks](ephemeral-os-disks.md)
7980

8081
*Unsupported* features in DCasv5-series VMs:
8182

8283
- [Live Migration](maintenance-and-updates.md)
8384
- [Memory Preserving Updates](maintenance-and-updates.md)
8485
- [Accelerated Networking](../virtual-network/create-vm-accelerated-networking-cli.md)
85-
- [Ephemeral OS Disks](ephemeral-os-disks.md)
8686

8787
### ECadsv5-series products
8888

0 commit comments

Comments
 (0)