r/PowerShell • • Jan 26 '22

Solved Best way to use Microsoft Graph API without showing secret key?

I've been following along The Lazy Administrator's Guide. I'm fairly new to all this, and I am stuck with the method to connect to Graph. I have the IDs and Secret Key, but not sure how I can add it to a script without revealing what those keys are. Based on the guide, I think the best one to use is the Client Credentials, but again not sure how to "encrypt the client secret, store it in Azure Key Vault".

For context, I am learning how to use Graph API so I can send emails from a script I made in Powershell.

9 Upvotes

Duplicates