From fbba4e2ee3221216b37e61d0fcd1c2f65063cadb Mon Sep 17 00:00:00 2001 From: Owen Richards <91555661+OwenRichards1@users.noreply.github.com> Date: Fri, 11 Oct 2024 16:13:33 +0100 Subject: [PATCH] open-pr-cli (#97) --- README.md | 30 +++++++++++++++--------------- console-cli/Program.cs | 10 +++++----- console-cli/README.md | 8 ++------ 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 791fadb..d3eb61a 100644 --- a/README.md +++ b/README.md @@ -6,21 +6,21 @@ Each project demonstrates one or more aspects of using the Microsoft identity pl ## Contents -| Sample ID
(Microsoft internal tracking) | Sample directory | Application type | Feature(s) demonstrated | Authentication libraries used | -|:--------------------------------------------:|:----------------------------------------------------|------------------|-------------------------|-------------------------------| -| `DOCS-CODE-030` | [console-cli](./console-cli) | | | | -| `DOCS-CODE-010` | [console-daemon](./console-daemon) | | | | -| `DOCS-CODE-025` | [desktop-winforms](./desktop-winforms/) | | | | -| `DOCS-CODE-027` | [desktop-winui](./desktop-winui/) | | | | -| `DOCS-CODE-026` | [desktop-wpf](./desktop-wpf/) | | | | -| `DOCS-CODE-021` | [spa-blazor-wasm](./spa-blazor-wasm/) | | | | -| `DOCS-CODE-001` | [web-api](./web-api/) | | | | -| `DOCS-CODE-004` | [web-api-azure-function](./web-api-azure-function/) | | | | -| `DOCS-CODE-007` | [web-api-obo-client](./web-api-obo-client/) | | | | -| `DOCS-CODE-013` | [web-api-obo-user](./web-api-obo-user/) | | | | -| `DOCS-CODE-016` | [web-app-aspnet](./web-app-aspnet/) | | | | -| `DOCS-CODE-017` | [web-app-blazor-server](./web-app-blazor-server/) | | | | -| `DOCS-CODE-029` and
`DOCS-CODE-035` | [xplat-maui](./xplat-maui/) | | | | +| Sample directory | Application type | Feature(s) demonstrated | Authentication libraries used | +|:----------------------------------------------------|------------------|-------------------------|-------------------------------| +| [console-cli](./console-cli) | | | | +| [console-daemon](./console-daemon) | | | | +| [desktop-winforms](./desktop-winforms/) | | | | +| [desktop-winui](./desktop-winui/) | | | | +| [desktop-wpf](./desktop-wpf/) | | | | +| [spa-blazor-wasm](./spa-blazor-wasm/) | | | | +| [web-api](./web-api/) | | | | +| [web-api-azure-function](./web-api-azure-function/) | | | | +| [web-api-obo-client](./web-api-obo-client/) | | | | +| [web-api-obo-user](./web-api-obo-user/) | | | | +| [web-app-aspnet](./web-app-aspnet/) | | | | +| [web-app-blazor-server](./web-app-blazor-server/) | | | | +| [xplat-maui](./xplat-maui/) | | | | ## Resources diff --git a/console-cli/Program.cs b/console-cli/Program.cs index a7d12d3..2fe7833 100644 --- a/console-cli/Program.cs +++ b/console-cli/Program.cs @@ -4,11 +4,11 @@ var config = new PublicClientApplicationOptions { - // 'Directory (tenant) ID' of app registration in the Azure portal - this value is a GUID - TenantId = "", + // 'Directory (tenant) ID' of the app registration in the Microsoft Entra Admin Center + TenantId = "Enter the client ID obtained from the Microsoft Entra admin center", - // 'Application (client) ID' of app registration in Azure portal - this value is a GUID - ClientId = "" + // 'Application (client) ID' of the app registration in the Microsoft Entra Admin Center + ClientId = "Enter the tenant ID obtained from the Microsoft Entra admin center" }; // In order to take advantage of token caching, your MSAL client singleton must @@ -35,7 +35,7 @@ } catch (MsalUiRequiredException) { - // No usable cached token was found for this scope + account or Azure AD insists in + // No usable cached token was found for this scope + account or Entra ID insists in // an interactive user flow. } } diff --git a/console-cli/README.md b/console-cli/README.md index bc200ed..f97eb25 100644 --- a/console-cli/README.md +++ b/console-cli/README.md @@ -5,7 +5,7 @@ languages: - csharp page_type: sample name: .NET (C#) console application that makes a request to the Graph API via the Device Code flow -description: This .NET 6 console application uses the device code flow for authentication and then makes a request to Microsoft Graph for the user's profile data. +description: This .NET8 console application uses the device code flow for authentication and then makes a request to Microsoft Graph for the user's profile data. products: - azure - entra-id @@ -16,11 +16,7 @@ urlFragment: ms-identity-docs-code-console-cli-csharp # .NET (C#) | console | user sign-in, protected web API access (Microsoft Graph) | Microsoft identity platform - - -This .NET 6 (C#) console application authenticates a user via the device code flow, and then makes a request to the Graph API as the authenticated user. The response to the request is printed to the console. +This .NET8 (C#) console application authenticates a user via the device code flow, and then makes a request to the Graph API as the authenticated user. The response to the request is printed to the console. ```console $ dotnet run