Skip to content

BlazorWebAppOidc Using Microsoft Graph #315

@peterthorpe81

Description

@peterthorpe81

I am looking at the BlazorWebAppOidc sample as a way to begin moving to auto render mode from WASM Hosted. I have got the basic working but my app uses Microsoft Graph to send emails. I would have previously configured this in my WASM Hosted setup with something like:

 builder.Services.AddAuthentication()
     .AddMicrosoftIdentityWebApi(builder.Configuration.GetSection("azureAd"), JwtBearerDefaults.AuthenticationScheme)
     .EnableTokenAcquisitionToCallDownstreamApi()
     .AddMicrosoftGraph(builder.Configuration.GetSection("GraphScopes"))
     .AddInMemoryTokenCaches();

That would allow me to inject the GraphServiceClient. Is there an equivalent easy way to get this working with the example?

I know there is an ongoing conversation about the Microsoft Identity platform (Entra ID) being missing from the .NET 8.0 templates dotnet/aspnetcore#51202


Issue Details

Do not edit this section. It is required for issue processing.

Metadata

Metadata

Assignees

Labels

QuestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions