You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
We should align with other languages and make initialization easier #180
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 concernsrequest_adapter=GraphRequestAdapter(auth_provider)
# Get a service clientclient=GraphServiceClient(request_adapter)
And only request from the developer to specify the context, the scope and its required values.
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.
Reacted by Andrew Omondi, Samwel K. and Shem Ogumbe
Activity
isvargasmsft commentedon Apr 25, 2023
CC: Samwel K. (@samwelkanda) Shem Ogumbe (@shemogumbe) Vincent Biret (@baywet)
baywet commentedon Apr 25, 2023
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.