Azure-Samples / active-directory-dotnet-native-aspnetcore-v2

Calling a ASP.NET Core Web API from a WPF application using Azure AD v2.0
MIT License
286 stars 198 forks source link

Bad Request An error occurred while calling the downstream API Code: generalException #232

Closed pippaz closed 1 year ago

pippaz commented 1 year ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

First time running desktop application. Signs in. Successful. Add To do item - error. Item not added to list

Any log messages given by the failure

Bad Request An error occurred while calling the downstream API Code: generalException

Expected/desired behavior

Item to be added to the to do list, and text box cleared

OS and Version?

Windows 10

Versions

Mention any other details that might be useful

Line that fails: // Call the To Do list service. 289: HttpResponseMessage response = await _httpClient.PostAsync(TodoListApiAddress, content);


Thanks! We'll be in touch soon.

pippaz commented 1 year ago

Client Secret input is not in steps on the https://learn.microsoft.com/en-us/samples/azure-samples/active-directory-dotnet-native-aspnetcore-v2/1-desktop-app-calls-web-api/ link

jmprieur commented 1 year ago

@pippaz how did you fix your issue?

pippaz commented 1 year ago

I entered the client secret information. The README file had instructions that this link didn't. They are out of sync/date

https://learn.microsoft.com/en-us/samples/azure-samples/active-directory-dotnet-native-aspnetcore-v2/1-desktop-app-calls-web-api/ link