Use Cert based auth instead. Dont use a service account with a password.
https://learn.microsoft.com/en-us/graph/powershell/app-only?tabs=azure-portal
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello Everyone
We currently have created a small application that automatically reads Users from a database, that should get added (or changed) automatically in our Azure Active Directory with a Powershell script. Now we would like to log onto the Azure AD with this script, without adding the password in plain text. Is there a possibility to log onto the Azure Active Directory unattended, without adding the password to the file itself?
Thank you for your Help.
Kind regards,
Gabriel
Use Cert based auth instead. Dont use a service account with a password.
https://learn.microsoft.com/en-us/graph/powershell/app-only?tabs=azure-portal
Get-mguser works for all users.
Example:
Get-MgUser -All
Get-MgUser -UserId <user>
etc..
Hello @Bühler Gabriel
You can find different options to add authentication unattended to your script in this Microsoft article:
https://learn.microsoft.com/en-us/powershell/azure/authenticate-azureps?view=azps-7.0.0
Hope this helps with your query,
---------
--If the reply is helpful, please Upvote and Accept as answer--