Azure-Samples / Azure-Samples/communication-services-authentication-hero-csharp
[BUG] Can't log in because of missing scope in MinimalClient example
- Dominant language
- C#
- Stars
- 9
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
Trying to log in in the example webapp results in a failed login. The URL changes for a split second and shows an error in the redirect url.
``` http://localhost:3000/#error=invalid_client&error_description=AADSTS65005%3a+The+application+%276fefc494-418f-4afc-a362-fc97e388e891%27+asked+for+scope+%27access_as_user%27+that+doesn%27t+exist.+Trace+ID%3a+4940f997-16ae-44ab-9548-dd91cd1e3600+Correlation+ID%3a+b492a704-0621-43c7-8e4c-feb3c055b19b+Timestamp%3a+2024-06-13+14%3a34%3a27Z&state=eyJpZCI6IjdhNjQwNDQ4LTFjY2MtNDAwZi1hMjBmLTEwMDU1NDY3MDg1NyIsIm1ldGEiOnsiaW50ZXJhY3Rpb25UeXBlIjoicmVkaXJlY3QifX0%3d ```
Decoding the above URL the error message is:
AADSTS65005: The application '6fefc494-418f-4afc-a362-fc97e388e891' asked for scope 'access_as_user' that doesn't exist.
Checking the API permissions of the 6fefc494-418f-4afc-a362-fc97e388e891 app the access_as_user delegated permission is there. I was also able to set up oauth login in postman with the api://6fefc494-418f-4afc-a362-fc97e388e891/access_as_user scope.
### To Reproduce
Steps to reproduce the behavior:
1. Setup example on windows 10 with app creation scripts
2. Open the web application running on port 3000
3. Try to log in with any of the login options
### Expected behavior
Successful login.
Contributor guide
Assessment
This issue has not been assessed yet.