Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are these examples still current and expected to run? #84

Open
sam-wheat opened this issue Apr 27, 2024 · 1 comment
Open

Are these examples still current and expected to run? #84

sam-wheat opened this issue Apr 27, 2024 · 1 comment

Comments

@sam-wheat
Copy link

https://github.com/Azure-Samples/ms-identity-docs-code-dotnet/tree/main/web-app-aspnet

I tried to implement the project shown above however it repeatedly loops, asking for a password.

Before I get too far into troubleshooting it I want make sure this code is has not been deprecated as there is another example found here that works but uses different code.

Is this code still the recommended approach for web apps?

@dannoe
Copy link

dannoe commented Jun 12, 2024

Replace this:

IEnumerable<string>? initialScopes = builder.Configuration["DownstreamApi:Scopes"]?.Split(' ');

with this

IEnumerable<string>? initialScopes = builder.Configuration.GetSection("DownstreamApi:Scopes").Get<IEnumerable<string>>();

inside of Program.cs and it should work again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants