I struggled with this for awhile so I thought I would share. I had a case where I needed to get to appsettings.json (IConfiguration) from my plugin registration method (IExternalAuthenticationRegistrar). I tried a few different things, including implementing INopStartup and storing the IConfiguration that interface gets via its constructor - but the value was lost by time the

public void Configure(AuthenticationBuilder builder)


method came around.

Anyway, this is what I came up with. If anyone has a better idea, please let me know!

var myConfig = builder.Services.BuildServiceProvider().GetService<IConfiguration>()