forked from AutoApiSecret
encrypt refresh_token with aes-256
- Open https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade and then click
New registration
. - Enter a name for your app, choose account type
Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)
, selectWeb
inRedirect URI
, then typehttp://localhost:53682/
and click Register. Copy and keep theApplication (client) ID
under the app name for later use. - Under
manage
selectCertificates & secrets
, clickNew client secret
. Copy and keep that secret for later use. - Under
manage
selectAPI permissions
, clickAdd a permission
and selectMicrosoft Graph
then selectdelegated permissions
. - Search and select the following permissions:
Files.Read.All Sites.Read.All User.Read.All Directory.Read.All Mail.Read MailboxSettings.Read
. Once selected clickAdd permissions
at the bottom. - Download this script on your Windows computer, click
run in powershell
in the right-click menu, enter yourclient id
andclient secret
, and follow the instruction to getrefresh_token
. (if the script is forbidden, execute in powershell as administratorStart-Process -Wait -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
) - Click https://github.com/yuudi/ms-tester-encrypted/generate, this will help you create a github repositories, either public or private are okay.
- Go to repositories settings, click
secrets
, clickNew secret
, enterAES_KEY
inName
, enter any password inValue
. (you don't need to remember it, just use a random string) - Repeat the previous step and add these secrets:
CLIENT_ID
-> your client id,CLIENT_SECRET
-> your client secret,REFRESH_TOKEN
-> the refresh_token we get just now. - Go to repositories actions, enable the actions, and enjoy the tester, you can click
Run workflow
to manual trigger it.