Last active
October 13, 2021 14:49
-
-
Save mr64bit/3fd8f321717c9a6423f7949d494b6cd9 to your computer and use it in GitHub Desktop.
Microsoft Graph setup for Empire Onedrive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create an app at https://apps.dev.microsoft.com | |
The only things you need are an app password ("Generate new password"), an app platform with a redirect url, ("https://login.live.com/oauth20_desktop.srf" works good as a default) and the delegated permissions Files.ReadWrite, User.Read, and offline_access. | |
Example: https://imgur.com/a/rd47l | |
Once you create the app, you will be given an Application ID. Enter this into your listener options. | |
"set ClientId <your application id>" | |
"set ClientSecret <you application secret/password>" | |
Then do "execute". This will not start the listener yet, but will give you an OAuth URL to sign in to. | |
You will be redirected to a URL like "https://login.live.com/oauth20_desktop.srf?code=M12ac16111-a605-42e9-9dbf-c155de30cfc6&lc=1033". Take the code parameter from that URL and enter it into the listener options. | |
"set AuthCode M12ac16111-a605-42e9-9dbf-c155de30cfc6" | |
Do "execute" again, and the listener will start. | |
You will not have to repeat this process at every start up, the listener will store a refresh token. This token may expire after a week or two, and the sign-in process must be done again. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Im setting ClientID, ClientSecret and executing the Listener to get the URI.
Using the URI im redirected to a URI of a different pattern, containing "code" parameter of a different size/pattern as well and another parameter called "session_state" (and not "lc" as shown here)
The code Im getting is in the form:
code=0.AR8AlDu5_pYAuU2LJ2x7EvXeaWs3p_AaJ8FPsijsLM88kqofADY.AQABAAIAAAD--LPO4VO7QrddgJg7WevreBLBFPmUr7bbizhxCVBNldHZwDYyMHsh2_k7H5wrnKVPOiooRXg6_H6OMX7-aCFQjgskSjgeEAM0qH3m9tmbeNFwsyrvl_Q7etlXwxr_k4rC2AfbPqDuD91uM3K1kP1UfIouIvPivCeXTGx7OcNxwcoy1K28EPcqFtdWmvqvXtQgByX6JRyFdZCCn4UdiptDFe3nhMsIXaL5WZW9qxyuxD8Og4ZVzZ4FQ68HI30grmVeX9kspWUY95pnTUb-sOBkSLnct2eZZESwMGj7aM1QngGb05LLeoX9s2rYTURdFu6HR0-BL5kk0dBBnWt78Z9Xor3Ukip2ufqq4-f9nFJ1KavkLC9V_BlxAmhhCOy43k4d8lUHfzPr8NuIaX4Q45C5p7MUsmFBoWd_BwFdRzFoUHfLye_a2bP7mdBL7gxbaQlYtPAAWX9zR--FGONB6g-heiH1HDyMSM-s8REMzfPURWm5y-UGHYGqDs8RWVSFDzYXFZN2hcAKXHPQQlduPQVsm-mV2g0Lg7ZlW1jy9dDEguP39YqqSJ6f_qSLAXulk2ouLSEkxsa7kG2Vg2CiU0U_aKeZG5kN7s_9BJJSFyiU6pHOKKCgjYyCCqQvnG__g734SkNzL-kEBYdCm0HQN_pWaIAA
After setting it to AuthCode and executing again the listener wont run (ValueError: Could not set up folders, access token invalid)
Will appreciate any help