Skip to content

Commit 263e02a

Browse files
abrilgzzdanielluo-msft
authored andcommitted
Apply suggestions from code review
1 parent 8b38af5 commit 263e02a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Service/GroupMembershipManagement/Common.DependencyInjection/ServiceCollectionExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ public static IServiceCollection AddGraphAPIClient(this IServiceCollection servi
1616
{
1717
var configuration = services.GetService<IConfiguration>();
1818
var graphCredentials = services.GetService<IOptions<GraphCredentials>>().Value;
19-
if (graphCredentials.AuthenticationType == AuthenticationType.Unknown || graphCredentials.AuthenticationType == default(AuthenticationType))
19+
if (graphCredentials.AuthenticationType == AuthenticationType.Unknown)
2020
{
21-
graphCredentials.AuthenticationType = MapStringToAuthenticationType("ClientSecret");
21+
graphCredentials.AuthenticationType = MapStringToAuthenticationType(configuration["GraphAPI:AuthenticationType"]);
2222
}
2323
var credential = FunctionAppDI.CreateAuthenticationProvider(graphCredentials, graphCredentials.AuthenticationType);
2424
return new GraphServiceClient(credential);

0 commit comments

Comments
 (0)