Skip to content

[Feature] IProvider.GetTokenAsync should accept additional scopes #111

@shweaver-MSFT

Description

@shweaver-MSFT

Describe the problem this feature would solve

Currently, the only way to add scopes is to configure them during provider initialization. This means that it is difficult to add any additional scopes at runtime without completely reconfiguring the global IProvider instance.

Describe the solution

Enable IProvider.GetTokenAsync to accept an array of access scopes:

IProvider provider = ProviderManager.Instance.GlobalProvider;
string token = provider.GetTokenAsync(scopes: new string[] { "Tasks.ReadWrite" }, silentOnly: false);

Providing none will default to any pre-configured scopes in the provider.

Describe alternatives you've considered

None

Additional context & Screenshots

This request is inspired by the pattern in MGT.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions