diff --git a/.openpublishing.redirection.json b/.openpublishing.redirection.json index c225f81f97..1b0a463815 100644 --- a/.openpublishing.redirection.json +++ b/.openpublishing.redirection.json @@ -1081,6 +1081,16 @@ "source_path_from_root": "/docs/identity/saas-apps/ghae-provisioning-tutorial.md", "redirect_url": "/entra/identity/saas-apps/tutorial-list", "redirect_document_id": false + }, + { + "source_path_from_root": "/docs/identity-platform/quickstart-v2-uwp.md", + "redirect_url": "/entra/identity-platform/quickstart-desktop-app-wpf-sign-in", + "redirect_document_id": false + }, + { + "source_path_from_root": "/docs/identity-platform/tutorial-v2-windows-uwp.md", + "redirect_url": "/entra/identity-platform/quickstart-desktop-app-wpf-sign-in", + "redirect_document_id": false } ] } \ No newline at end of file diff --git a/docs/architecture/secure-resource-management.md b/docs/architecture/secure-resource-management.md index b4c829702c..b40ef54670 100644 --- a/docs/architecture/secure-resource-management.md +++ b/docs/architecture/secure-resource-management.md @@ -6,7 +6,7 @@ manager: martinco ms.service: entra ms.subservice: architecture ms.topic: conceptual -ms.date: 10/03/2023 +ms.date: 10/15/2024 ms.author: justinha ms.reviewer: justinha --- @@ -167,7 +167,7 @@ Microsoft Entra Domain Services provides a managed domain to facilitate authenti An Azure AD B2C tenant is linked to an Azure subscription for billing and communication purposes. Azure AD B2C tenants have a self-contained role structure in the directory, which is independent from the Azure RBAC privileged roles of the Azure subscription. -When the Azure AD B2C tenant is initially provisioned, the user creating the B2C tenant must have contributor or owner permissions in the subscription. They can later create other accounts and assign them to directory roles. For more information, see [Overview of role-based access control in Microsoft Entra ID](/identity/role-based-access-control/custom-overview). +When the Azure AD B2C tenant is initially provisioned, the user creating the B2C tenant must have contributor or owner permissions in the subscription. They can later create other accounts and assign them to directory roles. For more information, see [Overview of role-based access control in Microsoft Entra ID](~/identity/role-based-access-control/custom-overview.md). It's important to note that the owners and contributors of the linked Microsoft Entra subscription can remove the link between the subscription and the directory, which will affect the ongoing billing of the Azure AD B2C usage. diff --git a/docs/id-governance/scenarios/deploy-sap-netweaver.md b/docs/id-governance/scenarios/deploy-sap-netweaver.md index 1d068b11f4..779fabe2b7 100644 --- a/docs/id-governance/scenarios/deploy-sap-netweaver.md +++ b/docs/id-governance/scenarios/deploy-sap-netweaver.md @@ -197,7 +197,7 @@ Follow the steps below to configure the Web Service. :::image type="content" source="media/deploy-sap-netweaver/sap-35.png" alt-text="Screenshot of save." lightbox="media/deploy-sap-netweaver/sap-35.png"::: 13. Find a WSDL URL for Service under WSDL Generation section and copy that link. - Example: http://vhcalnplci.dummy.nodomain:8000/sap/bc/srt/wsdl/flv\_10002A1011D1/bndg\_url/sap/bc/srt/rfc/sap/zsapconnectorwebservice/001/zsapconnectorws/zsapconnectorws?sapclient\=001 + Example: `http://vhcalnplci.dummy.nodomain:8000/sap/bc/srt/wsdl/flv\_10002A1011D1/bndg\_url/sap/bc/srt/rfc/sap/zsapconnectorwebservice/001/zsapconnectorws/zsapconnectorws?sapclient\=001` :::image type="content" source="media/deploy-sap-netweaver/sap-36.png" alt-text="Screenshot of WSDL URL." lightbox="media/deploy-sap-netweaver/sap-36.png"::: diff --git a/docs/identity-platform/TOC.yml b/docs/identity-platform/TOC.yml index c88d4223c0..05d594b82e 100644 --- a/docs/identity-platform/TOC.yml +++ b/docs/identity-platform/TOC.yml @@ -302,16 +302,12 @@ items: - name: Node.js Electron href: quickstart-desktop-app-nodejs-electron-sign-in.md - - name: Universal Windows Platform (UWP) - href: quickstart-desktop-app-uwp-sign-in.md - name: Windows Presentation Foundation (WPF) href: quickstart-desktop-app-wpf-sign-in.md - name: Tutorials items: - name: Node.js Electron href: tutorial-v2-nodejs-desktop.md - - name: Universal Windows Platform (UWP) - href: tutorial-v2-windows-uwp.md - name: Windows Presentation Foundation (WPF) href: tutorial-v2-windows-desktop.md - name: Samples diff --git a/docs/identity-platform/quickstart-v2-uwp.md b/docs/identity-platform/quickstart-v2-uwp.md deleted file mode 100644 index 43a86f8fa0..0000000000 --- a/docs/identity-platform/quickstart-v2-uwp.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: "Quickstart: Sign in users and call Microsoft Graph in a Universal Windows Platform app" -description: In this quickstart, learn how a Universal Windows Platform (UWP) application can get an access token and call an API protected by Microsoft identity platform. -ROBOTS: NOINDEX -author: OwenRichards1 -manager: CelesteDG -ms.author: owenrichards -ms.custom: scenarios:getting-started, "languages:UWP", mode-api -ms.date: 01/14/2022 -ms.reviewer: jmprieur -ms.service: identity-platform - -ms.topic: quickstart -#Customer intent: As an application developer, I want to learn how my Universal Windows Platform (XAML) application can get an access token and call an API that's protected by the Microsoft identity platform. ---- - -# Quickstart: Call the Microsoft Graph API from a Universal Windows Platform (UWP) application - - -> [!div renderon="docs"] -> Welcome! This probably isn't the page you were expecting. While we work on a fix, this link should take you to the right article: -> -> > [Quickstart: Sign in users and call Microsoft Graph in a Universal Windows Platform app](quickstart-desktop-app-uwp-sign-in.md) -> -> We apologize for the inconvenience and appreciate your patience while we work to get this resolved. - -> [!div renderon="portal" class="sxs-lookup"] -> In this quickstart, you download and run a code sample that demonstrates how a Universal Windows Platform (UWP) application can sign in users and get an access token to call the Microsoft Graph API. -> -> See [How the sample works](#how-the-sample-works) for an illustration. -> -> -> ## Prerequisites -> -> * An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). -> * [Visual Studio 2019](https://visualstudio.microsoft.com/vs/) -> -> #### Step 1: Configure the application -> For the code sample in this quickstart to work, add a **Redirect URI** of `https://login.microsoftonline.com/common/oauth2/nativeclient`. -> > [!div class="nextstepaction"] -> > [Make this change for me]() -> -> > [!div class="alert alert-info"] -> > ![Already configured](media/quickstart-v2-uwp/green-check.png) Your application is configured with these attributes. -> -> #### Step 2: Download the Visual Studio project -> -> Run the project using Visual Studio 2019. -> > [!div class="nextstepaction"] -> > [Download the code sample](https://github.com/Azure-Samples/active-directory-dotnet-native-uwp-v2/archive/msal3x.zip) -> -> [!INCLUDE [active-directory-develop-path-length-tip](./includes/error-handling-and-tips/path-length-tip.md)] -> -> -> #### Step 3: Your app is configured and ready to run -> We have configured your project with values of your app's properties and it's ready to run. -> #### Step 4: Run the application -> -> To run the sample application on your local machine: -> -> 1. In the Visual Studio toolbar, choose the right platform (probably **x64** or **x86**, not ARM). The target device should change from *Device* to *Local Machine*. -> 1. Select **Debug** > **Start Without Debugging**. -> -> If you're prompted to do so, you might first need to enable **Developer Mode**, and then **Start Without Debugging** again to launch the app. -> -> When the app's window appears, you can select the **Call Microsoft Graph API** button, enter your credentials, and consent to the permissions requested by the application. If successful, the application displays some token information and data obtained from the call to the Microsoft Graph API. -> -> ## How the sample works -> -> ![Shows how the sample app generated by this quickstart works](media/quickstart-v2-uwp/uwp-intro.svg) -> -> ### MSAL.NET -> -> MSAL ([Microsoft.Identity.Client](https://www.nuget.org/packages/Microsoft.Identity.Client)) is the library used to sign in users and request security tokens. The security tokens are used to access an API protected by the Microsoft Identity platform. You can install MSAL by running the following command in Visual Studio's *Package Manager Console*: -> -> ```powershell -> Install-Package Microsoft.Identity.Client -> ``` -> -> ### MSAL initialization -> -> You can add the reference for MSAL by adding the following code: -> -> ```csharp -> using Microsoft.Identity.Client; -> ``` -> -> Then, MSAL is initialized using the following code: -> -> ```csharp -> public static IPublicClientApplication PublicClientApp; -> PublicClientApp = PublicClientApplicationBuilder.Create(ClientId) -> .WithRedirectUri("https://login.microsoftonline.com/common/oauth2/> nativeclient") -> .Build(); -> ``` -> -> The value of `ClientId` is the **Application (client) ID** of the app you registered in the Azure portal. You can find this value in the app's **Overview** page in the Azure portal. -> -> ### Requesting tokens -> -> MSAL has two methods for acquiring tokens in a UWP app: `AcquireTokenInteractive` and `AcquireTokenSilent`. -> -> #### Get a user token interactively -> -> Some situations require forcing users to interact with the Microsoft identity platform through a pop-up window to either validate their credentials or to give consent. Some examples include: -> -> - The first-time users sign in to the application -> - When users may need to reenter their credentials because the password has expired -> - When your application is requesting access to a resource, that the user needs to consent to -> - When two factor authentication is required -> -> ```csharp -> authResult = await App.PublicClientApp.AcquireTokenInteractive(scopes) -> .ExecuteAsync(); -> ``` -> -> The `scopes` parameter contains the scopes being requested, such as `{ "user.read" }` for Microsoft Graph or `{ "api:///access_as_user" }` for custom web APIs. -> -> #### Get a user token silently -> -> Use the `AcquireTokenSilent` method to obtain tokens to access protected resources after the initial `AcquireTokenInteractive` method. You don’t want to require the user to validate their credentials every time they need to access a resource. Most of the time you want token acquisitions and renewal without any user interaction -> -> ```csharp -> var accounts = await App.PublicClientApp.GetAccountsAsync(); -> var firstAccount = accounts.FirstOrDefault(); -> authResult = await App.PublicClientApp.AcquireTokenSilent(scopes, firstAccount) -> .ExecuteAsync(); -> ``` -> -> * `scopes` contains the scopes being requested, such as `{ "user.read" }` for Microsoft Graph or `{ "api:///access_as_user" }` for custom web APIs. -> * `firstAccount` specifies the first user account in the cache (MSAL supports multiple users in a single app). -> -> [!INCLUDE [Help and support](./includes/error-handling-and-tips/help-support-include.md)] -> -> ## Next steps -> -> Try out the Windows desktop tutorial for a complete step-by-step guide on building applications and new features, including a full explanation of this quickstart. -> -> > [!div class="nextstepaction"] -> > [UWP - Call Graph API tutorial](tutorial-v2-windows-uwp.md) diff --git a/docs/identity-platform/tutorial-v2-windows-uwp.md b/docs/identity-platform/tutorial-v2-windows-uwp.md deleted file mode 100644 index ece6bd9d12..0000000000 --- a/docs/identity-platform/tutorial-v2-windows-uwp.md +++ /dev/null @@ -1,553 +0,0 @@ ---- -title: "Tutorial: Create a Universal Windows Platform (UWP) app that uses the Microsoft identity platform for authentication" -description: In this tutorial, you build a UWP application that uses the Microsoft identity platform to sign in users and get an access token to call the Microsoft Graph API on their behalf. -author: henrymbuguakiarie -manager: CelesteDG -ms.author: henrymbugua -ms.custom: "devx-track-csharp" -ms.date: 11/10/2023 -ms.reviewer: jmprieur -ms.service: identity-platform - -ms.topic: tutorial -#Customer intent: As a developer building a Universal Windows Platform (UWP) application, I want to learn how to call the Microsoft Graph API and obtain an access token, so that I can integrate Microsoft Graph functionality into my application and access protected resources. ---- - -# Tutorial: Call the Microsoft Graph API from a Universal Windows Platform (UWP) application - -In this tutorial, you build a native Universal Windows Platform (UWP) app that signs in users and gets an access token to call the Microsoft Graph API. - -At the end of this guide, your application calls a protected API by using personal accounts. Examples are outlook.com, live.com, and others. Your application also calls work and school accounts from any company or organization that has Microsoft Entra ID. - -In this tutorial: - -> [!div class="checklist"] -> * Create a *Universal Windows Platform (UWP)* project in Visual Studio -> * Register the application in the Azure portal -> * Add code to support user sign-in and sign-out -> * Add code to call Microsoft Graph API -> * Test the app - -## Prerequisites - -* [Visual Studio 2019](https://visualstudio.microsoft.com/vs/) with the [Universal Windows Platform development](/windows/apps/windows-app-sdk/set-up-your-development-environment) workload installed - -## How this guide works - -![Shows how the sample app generated by this tutorial works](./media/tutorial-v2-windows-uwp/uwp-intro.svg) - -This guide creates a sample UWP application that queries the Microsoft Graph API. For this scenario, a token is added to HTTP requests by using the Authorization header. The Microsoft Authentication Library handles token acquisitions and renewals. - -> MSAL.NET versions 4.61.0 and above do not provide support for Universal Windows Platform (UWP), Xamarin Android, and Xamarin iOS. We recommend you migrate your UWP applications to modern frameworks like WINUI. Read more about the deprecation in [Announcing the Upcoming Deprecation of MSAL.NET for Xamarin and UWP](https://devblogs.microsoft.com/identity/uwp-xamarin-msal-net-deprecation/). - -## NuGet packages - -This guide uses the following NuGet package: - -|Library|Description| -|---|---| -|[Microsoft.Identity.Client](https://www.nuget.org/packages/Microsoft.Identity.Client)| Microsoft Authentication Library| -|[Microsoft.Graph](https://www.nuget.org/packages/Microsoft.Graph)|Microsoft Graph Client Library| - -## Set up your project - -This section provides step-by-step instructions to integrate a Windows Desktop .NET application (XAML) with sign-in with Microsoft. Then the application can query web APIs that require a token, such as the Microsoft Graph API. - -This guide creates an application that displays a button that queries the Microsoft Graph API and a button to sign out. It also displays text boxes that contain the results of the calls. - -> [!Tip] -> To see a completed version of the project you build in this tutorial, you can [download it from GitHub](https://github.com/Azure-Samples/active-directory-dotnet-native-uwp-v2/archive/msal3x.zip). - -### Create your application - -1. Open Visual Studio, and select **Create a new project**. -1. In **Create a new project**, choose **Blank App (Universal Windows)** for C# and select **Next**. -1. In **Configure your new project**, name the app, and select **Create**. -1. If prompted, in **New Universal Windows Platform Project**, select any version for **Target** and **Minimum** versions, and select **OK**. - - ![Minimum and Target versions](./media/tutorial-v2-windows-uwp/select-uwp-target-minimum.png) - -### Add the Microsoft Authentication Library to your project - -1. In Visual Studio, select **Tools** > **NuGet Package Manager** > **Package Manager Console**. -1. Copy and paste the following commands in the **Package Manager Console** window: - - ```powershell - Install-Package Microsoft.Identity.Client - Install-Package Microsoft.Graph - ``` - - > [!NOTE] - > The first command installs the [Microsoft Authentication Library (MSAL.NET)](https://aka.ms/msal-net). MSAL.NET acquires, caches, and refreshes user tokens that access APIs that are protected by the Microsoft identity platform. The second command installs [Microsoft Graph .NET Client Library](https://github.com/microsoftgraph/msgraph-sdk-dotnet) to authenticate requests to Microsoft Graph and make calls to the service. - -### Create your application's UI - -Visual Studio creates *MainPage.xaml* as a part of your project template. Open this file, and then replace your application's **Grid** node with the following code: - -```xml - - - -