From 95aa2cddd1b7f91cf2035c0f76c031f8d8240b78 Mon Sep 17 00:00:00 2001 From: Tiago Brenck Date: Tue, 10 Dec 2019 13:33:01 -0800 Subject: [PATCH] refactoring --- .../2-3-Multi-Tenant/Controllers/OnboardingController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2-WebApp-graph-user/2-3-Multi-Tenant/Controllers/OnboardingController.cs b/2-WebApp-graph-user/2-3-Multi-Tenant/Controllers/OnboardingController.cs index cabe543d..ca2c0494 100644 --- a/2-WebApp-graph-user/2-3-Multi-Tenant/Controllers/OnboardingController.cs +++ b/2-WebApp-graph-user/2-3-Multi-Tenant/Controllers/OnboardingController.cs @@ -104,7 +104,7 @@ public IActionResult Onboard() /// A value included in the request that also will be returned in the token response. It can be a string of any content you want. The state is used to encode information about the user's state in the app before the authentication request occurred, such as the page or view they were on.. /// Refer to https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-admin-consent for details on the response /// - public async Task ProcessCode(string tenant, string error, string error_description, string admin_consent, string state) + public async Task ProcessCode(string tenant, string error, string error_description, bool admin_consent, string state) { if (error != null) { @@ -112,7 +112,7 @@ public async Task ProcessCode(string tenant, string error, string return RedirectToAction("Error", "Home"); } - if (admin_consent.ToUpper() != "TRUE") + if (!admin_consent) { TempData["ErrorMessage"] = "The admin consent operation failed."; return RedirectToAction("Error", "Home");