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

Closed
sam-wheat opened this issue Apr 27, 2024 · 2 comments
Closed

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

sam-wheat opened this issue Apr 27, 2024 · 2 comments

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.

@OwenRichards1
Copy link
Collaborator

Thanks for the feedback @sam-wheat! I have worked on this sample to introduce the fix, and introduce version updates too.

#104

Your contribution is greatly appreciated!

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

3 participants