Skip to content

[FEATURE] Connect-PnPOnline with AcessToken to support multiple tokens #3925

Open
@sanek112r

Description

@sanek112r

Is your feature request related to a problem? Please describe.
We are connecting to PnP using the access token, and it works for most of cases.
However some PnP commands are switching the access tokens dynamically within the single cmdlet, for example, Get-PnPFolderSharingLink. When I captured the web requests issued by this cmdlet, I found that it gets some info from SharePoint endpoints and some from Graph beta. Obviously this scenario can not be supported with a single access token.

Describe the solution you'd like
I would like to specify multiple tokens, each one for certain audience. E.g. in my scenario, I would specify both SharePoint and Graph tokens. Then I would expect that internally PnP module will figure out which access token to use.

I think this syntax will work just fine Connect-PnPOnline -AccessTokens []

This signature will make it similar to how MicrosoftTeams handles similar scenario.

Describe alternatives you've considered
We have quite unique scenario, where access tokens is the best solution for us from the security standpoint. So unfortunately there seem to be no alternatives.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions