Forum Discussion
Patrick Rote
Oct 05, 2020Iron Contributor
How to create powershell to schedule task script Connect-AzureAD without credentials- MFA enabled
Hi there, I have created some scirpts in powershell to Get-AzureADGroup and Members but now i would like to schedule it. The issue is we are using MFA and don't know what needs to be done to be abl...
Thijs Lecomte
Oct 05, 2020Bronze Contributor
Your best bet would be to use the Graph API with 'application permissions'. This doesn't need an account, just an app registration.
Check out this blog => https://365bythijs.be/2020/09/17/an-introduction-into-the-graph-api/
And the Graph API docs =>https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http
Check out this blog => https://365bythijs.be/2020/09/17/an-introduction-into-the-graph-api/
And the Graph API docs =>https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http
- Patrick RoteOct 05, 2020Iron Contributor
Thijs Lecomte
Thanks Thijs.
Is there any other option apart from using Graph API
About this other option here belowhttps://erjenrijnders.nl/2018/08/30/azuread-login-without-credentials-unattended/
- Thijs LecomteOct 06, 2020Bronze ContributorThat's also an option
Check the official docs here => https://docs.microsoft.com/en-us/powershell/azure/active-directory/signing-in-service-principal?view=azureadps-2.0