Azure-Samples / Azure-Samples/ms-identity-ciam-dotnet-tutorial
Followed tutorial but exception with unauthorized
- Dominant language
- PowerShell
- Stars
- 48
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
I have followed the tutorial here [https://github.com/azure-samples/ms-identity-ciam-dotnet-tutorial/blob/main/2-Authorization/3-call-own-api-dotnet-core-daemon/README.md](https://github.com/azure-samples/ms-identity-ciam-dotnet-tutorial/blob/main/2-Authorization/3-call-own-api-dotnet-core-daemon/README.md) using the AppCreationScripts so everuthing is configured inside the appsettings.json.
Then I am doing:
`
cd 2-Authorization\3-call-own-api-dotnet-core-daemon\ToDoListClient
dotnet run
`
`
cd 2-Authorization\3-call-own-api-dotnet-core-daemon\ToDoListAPI
dotnet run
`
So first remark I think we should first start ToDoListAPI and then the ToDoListClient since the client will try to connect to https://localhost:44351/ so it has to be started first.
Anyway whatever I try I have an exception when runing:
```
var firstNewToDo = await toDoApiClient.PostForAppAsync(
ServiceName,
new ToDo()
{
Owner = Guid.NewGuid(),
Description = "Bake bread"
});
```
```
Exception thrown: 'System.Net.Http.HttpRequestException' in System.Private.CoreLib.dll
An exception of type 'System.Net.Http.HttpRequestException' occurred in System.Private.CoreLib.dll but was not handled in user code
Response status code does not indicate success: 401 (Unauthorized).
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.