You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Protect a multi-tenant SaaS web application and a Web API which calls Microsoft Graph on-behalf of the user with the Microsoft Identity Platform](#Protect-a-multi-tenant-SaaS-web-application-and-a-Web-API-which-calls-Microsoft-Graph-on-behalf-of-the-user-with-the-Microsoft-Identity-Platform)
27
-
-[About this sample](#About-this-sample)
28
-
-[Scenario](#Scenario)
29
-
-[Overview](#Overview)
30
-
-[Pre-requisites](#Pre-requisites)
31
-
-[Setup](#Setup)
32
-
-[Step 1: Clone or download this repository](#Step-1-Clone-or-download-this-repository)
33
-
-[Step 2: Register the sample applications with your Azure Active Directory tenant](#Step-2-Register-the-sample-applications-with-your-Azure-Active-Directory-tenant)
34
-
-[Choose the Azure AD tenant where you want to create your applications](#Choose-the-Azure-AD-tenant-where-you-want-to-create-your-applications)
35
-
-[Register the service app (WebApi-MultiTenant-ToDoListService-v2)](#Register-the-service-app-WebApi-MultiTenant-ToDoListService-v2)
36
-
-[Configure the service app (WebApi-MultiTenant-ToDoListService-v2) to use your app registration](#Configure-the-service-app-WebApi-MultiTenant-ToDoListService-v2-to-use-your-app-registration)
37
-
-[Register the client app (WebApp-MultiTenant-ToDoListClient-v2)](#Register-the-client-app-WebApp-MultiTenant-ToDoListClient-v2)
38
-
-[Configure the client app (WebApp-MultiTenant-ToDoListClient-v2) to use your app registration](#Configure-the-client-app-WebApp-MultiTenant-ToDoListClient-v2-to-use-your-app-registration)
39
-
-[Step 4: Run the sample](#Step-4-Run-the-sample)
40
-
-[Run the sample using Visual Studio](#Run-the-sample-using-Visual-Studio)
41
-
-[Run the sample using a command line interface such as VS Code integrated terminal](#Run-the-sample-using-a-command-line-interface-such-as-VS-Code-integrated-terminal)
-[Step 2. Trust development certificates](#Step-2-Trust-development-certificates)
44
-
-[Step 3. Run the applications](#Step-3-Run-the-applications)
45
-
-[Testing the Application](#Testing-the-Application)
46
-
-[The different ways of obtaining admin consent](#The-different-ways-of-obtaining-admin-consent)
47
-
-[Consent using the `/adminconsent` endpoint](#Consent-using-the-adminconsent-endpoint)
48
-
-[Consent using PowerShell](#Consent-using-PowerShell)
49
-
-[Explore the sample](#Explore-the-sample)
50
-
-[About the code](#About-the-code)
51
-
-[Provisioning your Multi-tenant Apps in another Azure AD Tenant programmatically](#Provisioning-your-Multi-tenant-Apps-in-another-Azure-AD-Tenant-programmatically)
52
-
-[Code for the Web App (TodoListClient)](#Code-for-the-Web-App-TodoListClient)
-[Choosing which scopes to expose](#Choosing-which-scopes-to-expose)
58
-
-[Custom Token Validation Allowing only Registered Tenants](#Custom-Token-Validation-Allowing-only-Registered-Tenants)
59
-
-[Community Help and Support](#Community-Help-and-Support)
60
-
-[Contributing](#Contributing)
61
-
-[More information](#More-information)
26
+
-[Protect a multi-tenant SaaS web application and a Web API which calls Microsoft Graph on-behalf of the user with the Microsoft Identity Platform](#protect-a-multi-tenant-saas-web-application-and-a-web-api-which-calls-microsoft-graph-on-behalf-of-the-user-with-the-microsoft-identity-platform)
27
+
-[About this sample](#about-this-sample)
28
+
-[Scenario](#scenario)
29
+
-[Overview](#overview)
30
+
-[Pre-requisites](#pre-requisites)
31
+
-[Setup](#setup)
32
+
-[Step 1: Clone or download this repository](#step-1-clone-or-download-this-repository)
33
+
-[Step 2: Register the sample applications with your Azure Active Directory tenant](#step-2-register-the-sample-applications-with-your-azure-active-directory-tenant)
34
+
-[Choose the Azure AD tenant where you want to create your applications](#choose-the-azure-ad-tenant-where-you-want-to-create-your-applications)
35
+
-[Register the service app (WebApi-MultiTenant-ToDoListService-v2)](#register-the-service-app-webapi-multitenant-todolistservice-v2)
36
+
-[Configure the service app (WebApi-MultiTenant-ToDoListService-v2) to use your app registration](#configure-the-service-app-webapi-multitenant-todolistservice-v2-to-use-your-app-registration)
37
+
-[Register the client app (WebApp-MultiTenant-ToDoListClient-v2)](#register-the-client-app-webapp-multitenant-todolistclient-v2)
38
+
-[Configure the client app (WebApp-MultiTenant-ToDoListClient-v2) to use your app registration](#configure-the-client-app-webapp-multitenant-todolistclient-v2-to-use-your-app-registration)
39
+
-[Step 4: Run the sample](#step-4-run-the-sample)
40
+
-[Run the sample using Visual Studio](#run-the-sample-using-visual-studio)
41
+
-[Run the sample using a command line interface such as VS Code integrated terminal](#run-the-sample-using-a-command-line-interface-such-as-vs-code-integrated-terminal)
-[Step 2. Trust development certificates](#step-2-trust-development-certificates)
44
+
-[Step 3. Run the applications](#step-3-run-the-applications)
45
+
-[Testing the Application](#testing-the-application)
46
+
-[The different ways of obtaining admin consent](#the-different-ways-of-obtaining-admin-consent)
47
+
-[Consent using the `/adminconsent` endpoint](#consent-using-the-adminconsent-endpoint)
48
+
-[Consent using PowerShell](#consent-using-powershell)
49
+
-[Explore the sample](#explore-the-sample)
50
+
-[About the code](#about-the-code)
51
+
-[Provisioning your Multi-tenant Apps in another Azure AD Tenant programmatically](#provisioning-your-multi-tenant-apps-in-another-azure-ad-tenant-programmatically)
52
+
-[Code for the Web App (TodoListClient)](#code-for-the-web-app-todolistclient)
1. AddMicrosoftWebAppAuthentication : This enables your application to use the Microsoft identity platform endpoint. This endpoint is capable of signing-in users both with their Work and School and Microsoft Personal accounts.
403
-
1. AddMicrosoftWebAppCallsWebApi : Enables the web app to call protected APIs.
403
+
1. AddMicrosoftWebAppCallsWebApi : Enables the web app to call the protected API ToDoList Api.
404
404
1. AddInMemoryTokenCaches: Adds an in memory token cache provider, which will cache the Access Tokens acquired for the Web API.
405
405
406
406
The following code enables to add client service to use the HttpClient by dependency injection.
0 commit comments