Skip to content

Samples: Demo.ConsoleApp - Updated to .NET 10 and some other minor improvements to support environments for appsettings - #1833

Draft
gszdev wants to merge 3 commits into
pnp:devfrom
gszdev:previews/dev_DemoConsoleApp_net10_env_appsettings
Draft

Samples: Demo.ConsoleApp - Updated to .NET 10 and some other minor improvements to support environments for appsettings#1833
gszdev wants to merge 3 commits into
pnp:devfrom
gszdev:previews/dev_DemoConsoleApp_net10_env_appsettings

Conversation

@gszdev

@gszdev gszdev commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Fix for #1830

gszdev added 2 commits August 5, 2026 13:56
…provements to support environments for appsettings.
…provements to support environments for appsettings.

(fix README.md - {} => {placeholder})
@Adam-it

Adam-it commented Aug 6, 2026

Copy link
Copy Markdown
Member

@gszdev thanks for opening a PR. We will try to go over the review ASAP

@Adam-it Adam-it self-assigned this Aug 10, 2026

@Adam-it Adam-it left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gszdev awesome work 👍. I added some minor styling issues we could fixup before we proceed with the merge.
Also like in the Demo.WPF sample PR I fixed up, here we are missing a launch.json and tasks.json file for VS Code to run it

Comment on lines +19 to +22
- [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp)

- Under __Implicit grant__ section, check __ID tokens__ and __Access tokens__

- Under __Advanced settings__ section, set __Allow public client flows__ to __yes__
## Sample configuration

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp)
- Under __Implicit grant__ section, check __ID tokens__ and __Access tokens__
- Under __Advanced settings__ section, set __Allow public client flows__ to __yes__
## Sample configuration
- [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp)
## Sample configuration

Comment on lines +47 to 48
### Step 2) Configure the application
- This demo application comes with code for 2 different authentication providers, the `CredentialManagerAuthenticationProvider` or the `InteractiveAuthenticationProvider` can be used. The latter is the default value. To configure the app update the `appsettings.json` file with:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Step 2) Configure the application
- This demo application comes with code for 2 different authentication providers, the `CredentialManagerAuthenticationProvider` or the `InteractiveAuthenticationProvider` can be used. The latter is the default value. To configure the app update the `appsettings.json` file with:
### Step 2) Configure the application
- This demo application comes with code for 2 different authentication providers, the `CredentialManagerAuthenticationProvider` or the `InteractiveAuthenticationProvider` can be used. The latter is the default value. To configure the app update the `appsettings.json` file with:

Comment on lines +62 to +64
## Step 3) Run the sample
### Visual Studio Code and Visual Studio
Press **F5** to launch the sample.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Step 3) Run the sample
### Visual Studio Code and Visual Studio
Press **F5** to launch the sample.
## Step 3) Run the sample
### Visual Studio Code and Visual Studio
Press **F5** to launch the sample.

Comment on lines +122 to +124
// Ensure you do consent to the PnP App when using another tenant (update below url to match your aad domain):
// https://login.microsoftonline.com/a830edad9050849523e17050400.onmicrosoft.com/adminconsent?client_id=31359c7f-bd7e-475c-86db-fdb8c937548e&state=12345&redirect_uri=https://www.pnp.com
// .UseEnvironment("officedevpnp")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is not valid. The multitenant PnP App does not exist anymore and we always need to create our own app reg for authentication

@Adam-it
Adam-it marked this pull request as draft August 10, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: examples 🐱‍👤 Add or improve samples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

💡 [Feature]: Update Sample Demo.Console to .NET 10

2 participants