Adding the ability to surface the access token used by the connection #2010
Replies: 4 comments
-
There are many scenarios where it will be useful to get the access token for re-use with other libraries especially in devops pipelines. It's possible to do this in Azure PowerShell today with Get-AzAccessToken so a similar Get-MgAccessToken would be helpful to use the same access with other modules including AzPowerShell. This will also help with Azure AD PowerShell to Graph migration. We can start using Connect-MgGraph and reusing the token with Connect-AzureAD. This way we can begin upgrading a script without having to re-write the entire script in one attempt. |
Beta Was this translation helpful? Give feedback.
-
Yes please. Let's have the Get-MgAccessToken cmdlet to reduce friction and help people on their journey to embrace the Graph in PowerShell |
Beta Was this translation helpful? Give feedback.
-
Less modules for auth flow is very welcomed and would ease the road in current migration paths. |
Beta Was this translation helpful? Give feedback.
-
This has been moved to Issues so it can be tracked by the team. Please post all comments over at #2023 |
Beta Was this translation helpful? Give feedback.
-
Would it be possible to add the ability to surface the access token used by the connection (Connect-MgGraph).
I prefer to call the Graph API directly (using Invoke-MgGraphRequest rather than the specific cmdlets) but ideally I would like call the Graph API directly with Invoke-WebRequest using the access token of the Graph SDK connection.
Read: I want to piggy-back on the auth part of the module (mainly when leveraging delegated permissions as using the auth of the module is easier than writing and maintaining your own authorization code flow functions).
Beta Was this translation helpful? Give feedback.
All reactions