Kindly share the screenshot or full error message after (removing PII) you are getting while trying to call the API from UI app.
Update1:
Looks to be a scope relate issue while calling the API. Kindly ensure your app have appropriate scope to get an access token. For ref you may follow : Angular single-page application using MSAL Angular to authenticate users with Azure AD for Customers and call a protected ASP.NET Core web API
Update 2:
Below are the things OP changed based off looking at the sample project.
Program.cs (API)
app.MapControllers();
to
app.UseEndpoints(endpoints => {
_ = endpoints.MapControllers();
});
On the controller in question that is calling the IDownstream helper i had to add: [AuthorizeForScopes(ScopeKeySection = "DownstreamApi:Scopes")]
Thanks,
Akshay Kaushik