diff --git a/src/MicrosoftGraphBinding/Config/MicrosoftGraphExtensionConfigProvider.cs b/src/MicrosoftGraphBinding/Config/MicrosoftGraphExtensionConfigProvider.cs index c6e8e60..b155130 100644 --- a/src/MicrosoftGraphBinding/Config/MicrosoftGraphExtensionConfigProvider.cs +++ b/src/MicrosoftGraphBinding/Config/MicrosoftGraphExtensionConfigProvider.cs @@ -46,7 +46,6 @@ public MicrosoftGraphExtensionConfigProvider(IOptions options, IGraphSubscriptionStore subscriptionStore) { _options = options.Value; - _options.SetAppSettings(appSettings); _graphServiceClientManager = new GraphServiceClientManager(_options, tokenConverter, graphClientProvider); _subscriptionStore = subscriptionStore; _loggerFactory = loggerFactory; diff --git a/src/MicrosoftGraphBinding/Config/MicrosoftGraphWebJobsBuilderExtensions.cs b/src/MicrosoftGraphBinding/Config/MicrosoftGraphWebJobsBuilderExtensions.cs index b3cd656..4713e9f 100644 --- a/src/MicrosoftGraphBinding/Config/MicrosoftGraphWebJobsBuilderExtensions.cs +++ b/src/MicrosoftGraphBinding/Config/MicrosoftGraphWebJobsBuilderExtensions.cs @@ -17,13 +17,21 @@ public static IWebJobsBuilder AddMicrosoftGraph(this IWebJobsBuilder builder) } builder.AddExtension() - .BindOptions() - .BindOptions() .Services .AddAuthTokenServices() .AddSingleton, TokenConverter>() .AddSingleton() - .AddSingleton(); + .AddSingleton() + .AddOptions().Configure((option, appSettings) => + { + option.SetAppSettings(appSettings); + }) + .Services + .AddOptions().Configure((option, appSettings) => + { + option.SetAppSettings(appSettings); + }); + return builder; }