Aspire integration test with a protected api(via AddMicrosoftIdentityWebApi) failing
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
I have a protected api (using AddMicrosoftIdentityWebApi), when testing it via aspire integration test, the request to the protected resource returns 401, even if the access token attached to the header is valid.
On a non-aspire integration test, the same test works as expected.
### Expected Behavior
Should be able to access the protected resource with a valid access token.
### Steps To Reproduce
_No response_
### Exceptions (if any)
_No response_
### .NET Version info
.NET SDK:
Version: 10.0.100
Commit: b0f34d51fc
Workload version: 10.0.100-manifests.355811b7
MSBuild version: 18.0.2+b0f34d51f
Runtime Environment:
OS Name: Windows
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.