Skip to content

Connect using BYOT via a Managed Identity in Azure Functions #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
colinrippeyfinarne opened this issue Nov 6, 2019 · 10 comments · Fixed by #245 or #374
Closed

Connect using BYOT via a Managed Identity in Azure Functions #46

colinrippeyfinarne opened this issue Nov 6, 2019 · 10 comments · Fixed by #245 or #374
Assignees
Labels
Auth enhancement New feature or request
Milestone

Comments

@colinrippeyfinarne
Copy link

colinrippeyfinarne commented Nov 6, 2019

I have tons of use cases for running Powershell scripts in Azure Functions. What I do at the moment is obtain my Managed Identity bearer token (which I have previously granted permissions to) and the use the Invoke-WebRequest commandlet against the raw Graph API.
It would be great if as part of the Connect commandlet I was able to either pass in my already obtained bearer token, or even maybe ask the Connect commandlet to go get it for me.
AB#5613

@ghost ghost added the ToTriage label Nov 6, 2019
@darrelmiller darrelmiller added enhancement New feature or request and removed ToTriage labels Nov 29, 2019
@darrelmiller
Copy link
Contributor

This is a scenario that is definitely on our roadmap.

@darrelmiller darrelmiller modified the milestones: Backlog, 0.2.0 Nov 29, 2019
@edyoung
Copy link

edyoung commented Dec 6, 2019

This will also enable transparent auth in Cloud Shell

@darrelmiller
Copy link
Contributor

This functionality is dependent on work we are doing in .Graph SDK .NET 2.0.

@tobvil
Copy link

tobvil commented Apr 4, 2020

Would be awesome if would could use the module in Azure Functions.

@darrelmiller darrelmiller modified the milestones: 0.7.0 , 0.9.0 Apr 29, 2020
@jannickoeben
Copy link

Would love to see an accesstoken parameter. This would leave the option open to do cross-tenant/multi-tenant queries.

@ddyett
Copy link
Contributor

ddyett commented Aug 5, 2020

This is for Connect-Graph having a -token option to allow bypassing the normal code.

@ddyett ddyett modified the milestones: 0.9.0, Post GA Aug 5, 2020
@ddyett ddyett added the promote label Aug 5, 2020
@darrelmiller darrelmiller removed this from the Post GA milestone Aug 12, 2020
@darrelmiller darrelmiller added this to the 1.0 GA milestone Aug 12, 2020
@georgend
Copy link
Contributor

georgend commented Aug 15, 2020

@colinrippeyfinarne we have added a new CmdLet Invoke-GraphRequest, inspired by Invoke-WebRequest.
The new cmdlet has a -Token parameter that enables you to pass your required token as a SecureString.
For example:-
Invoke-GraphRequest -Uri https://graph.microsoft.com/beta/me -Token $token -Authentication UserProvidedToken

@colinrippeyfinarne
Copy link
Author

@colinrippeyfinarne we have added a new CmdLet Invoke-GraphRequest, inspired by Invoke-WebRequest.
The new cmdlet has a -Token parameter that enables you to pass your required token as a SecureString.
For example:-
Invoke-GraphRequest -Uri https://graph.microsoft.com/beta/me -Token $token -Authentication UserProvidedToken

Thanks for the details, but I hope that this is not the resolution to the request? I hope you are still looking to add a -Token parameter to the Connect commandlet as I want to use all the lovely wrapper commandlets after connecting via Connect.

It will of course be useful to have the Invoke-GraphRequest commandlet, but surely one of the points of this library is to abstract away having to craft up raw urls and deal in a higher level scripting model?

Thanks again though for the details, it will be very useful.

@ddyett ddyett modified the milestones: 1.0 GA, Post GA Sep 9, 2020
@georgend
Copy link
Contributor

georgend commented Oct 14, 2020

@colinrippeyfinarne We have added -AccessToken to Connect-Graph cmdlet in v1.0.1. Please take a look and give us feedback if it suits your needs. Thanks

@georgend georgend linked a pull request Oct 14, 2020 that will close this issue
@colinrippeyfinarne
Copy link
Author

@colinrippeyfinarne We have added -AccessToken to Connect-Graph cmdlet in v1.0.1. Please take a look and give us feedback if it suits your needs. Thanks

Brilliant, thanks for the update.

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