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

Unauthorized error when following "Desktop app calls Web API" instructions

Open
#187 7 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
290
Forks
194
PR merge metrics
No merged PRs in 30d

Description

> Please provide us with the following information:
> ---------------------------------------------------------------

![image](https://user-images.githubusercontent.com/7649589/109411711-dacec900-7958-11eb-868b-c51a7ababe79.png)

### This issue is for a: (mark with an `x`)
```
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

### Minimal steps to reproduce
> Follow the instructions completely. Then change the tenant to `common` in both App.config and appsettings.json. Then, sign in with personal microsoft account

![image](https://user-images.githubusercontent.com/7649589/109411728-f33ee380-7958-11eb-9359-7945b69ce584.png)
![image](https://user-images.githubusercontent.com/7649589/109411731-f934c480-7958-11eb-86c0-daa2d1933e30.png)

### Any log messages given by the failure
> "An error occurred while getting /api/todolist > Unauthorized"

### Expected/desired behavior
> No errors.

### OS and Version?
> Windows 10 19042

### Versions
>

### Mention any other details that might be useful

I understand that the instructions say "this sample does not work with personal microsoft accounts". What do I have to do in order to protect an API using personal microsoft accounts? This sample is everything that I need, except that I just need to accept personal MSAs from users. Please help!

> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.