C
C#15mo ago
Insight

❔ AzureAD App Registration ADO access in Blazor

I am trying to access azure dev ops work items using an application within my jobs azure active directory. I have the application working and I can connect and get the users information and roles. However I am confused at how exactly you use the API permissions. The blazor server application is using .AddMicrosoftIdentityWebApp() but I am unsure how to exactly add the HttpClient for the ADO rest api or to ensure I am getting the proper information to query the data. I have been working on this for a while but am confused at how exactly its all linked together.
2 Replies
Insight
InsightOP15mo ago
builder.Services.AddAuthentication(options =>
{
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
})
.AddMicrosoftIdentityWebApp(builder.Configuration.GetSection("AzureAd"))
.EnableTokenAcquisitionToCallDownstreamApi(builder.Configuration["DownstreamApi:Scopes"]?.Split(' '))
.AddMicrosoftGraph(builder.Configuration.GetSection("MicrosoftGraph"))
.AddInMemoryTokenCaches();
builder.Services.AddAuthentication(options =>
{
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
})
.AddMicrosoftIdentityWebApp(builder.Configuration.GetSection("AzureAd"))
.EnableTokenAcquisitionToCallDownstreamApi(builder.Configuration["DownstreamApi:Scopes"]?.Split(' '))
.AddMicrosoftGraph(builder.Configuration.GetSection("MicrosoftGraph"))
.AddInMemoryTokenCaches();
I guess would it count as a DownstreamAPI?
Accord
Accord15mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server