Skip to content

We should align with other languages and make initialization easier #180

Closed

Description

As discussed, we'd like to abstract these 3 lines of code:

auth_provider = AzureIdentityAuthenticationProvider(credential, scopes=scopes)

# Initialize a request adapter. Handles the HTTP concerns
request_adapter = GraphRequestAdapter(auth_provider)

# Get a service client
client = GraphServiceClient(request_adapter)

And only request from the developer to specify the context, the scope and its required values.

Activity

  1. baywet commented on Apr 25, 2023

    @baywet
    Member

    if possible an overload constructor defined in a derived class is probably the best option here. The generated client would become the BaseGraphClient and this manually crafted class that derives from it would become GraphServiceClient, and accept credential and scopes directly.
    That overload constructor should not mask the default one with the request adapter as people in need of more advanced configuration should still be able to pass a request adapter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions