E5

所属分类:智慧办公
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2023-09-27 16:27:35
上 传 者sh-1993
说明:  这是一个基于Git Actions的Python应用程序,通过Microsoft Graph API生成开发操作,就像一个真正的开发人员...,
(This is a Python application based from Git Actions to produce development actions through Microsoft Graph API like a genuine developer in order to activate Microsoft Office 365 E5 Developer Trail membership auto renewal.)

文件列表:
LICENSE (1065, 2023-12-12)
images/ (0, 2023-12-12)
images/actionsecret1.png (289872, 2023-12-12)
images/actionsecret2.png (352597, 2023-12-12)
images/actionsecret3.png (265906, 2023-12-12)
images/actionsecret4.png (24362, 2023-12-12)
images/apipermissions.png (369545, 2023-12-12)
images/apipermissions1.png (402400, 2023-12-12)
images/apipermissions2.png (372087, 2023-12-12)
images/apipermissions3.png (80652, 2023-12-12)
images/apipermissions4.png (72048, 2023-12-12)
images/appID.png (289988, 2023-12-12)
images/appreg.png (344916, 2023-12-12)
images/appreg2.png (207526, 2023-12-12)
images/azuredir.png (382991, 2023-12-12)
images/blob (1, 2023-12-12)
images/checkservice.png (338814, 2023-12-12)
images/clientsecret.png (285753, 2023-12-12)
images/configID.png (14028, 2023-12-12)
images/configKEY.png (13320, 2023-12-12)
images/fork.png (51599, 2023-12-12)
images/githubtoken.png (306318, 2023-12-12)
images/githubtoken1.png (344760, 2023-12-12)
images/githubtoken2.png (301198, 2023-12-12)
images/ms365&actions.png (40465, 2023-12-12)
images/rclone.png (29167, 2023-12-12)
images/rclone2.png (38324, 2023-12-12)
images/rclone3.png (82425, 2023-12-12)
images/rclone4.png (9473, 2023-12-12)
images/rclone5.png (54967, 2023-12-12)
images/rclone6.png (95745, 2023-12-12)
images/redirurl.png (219634, 2023-12-12)
images/secretcommit.png (276207, 2023-12-12)
images/secretkey.png (255974, 2023-12-12)
main.py (3090, 2023-12-12)
time.log (26, 2023-12-12)
... ...

# **MSO_E5_Dev_AutoRenew** MSO_E5_Dev_AutoRenew is a Python application based on Git Actions that uses Microsoft Graph API to activate Microsoft Office 365 E5 Developer Trail membership auto-renewal automatically. This guide will provide you with easy-to-understand steps for setting up and running the application. ### Special Notes/Thanks ### * Normal version address: [https://github.com/kylierst/MSO_E5_Dev_AutoRenew_REVISION_2](https://github.com/kylierst/MSO_E5_Dev_AutoRenew) * Thanks to Ken5998 for code improvements and fix job skipping ## **Prerequisites** - A GitHub account - An existing or new Microsoft Developer E5 account with trial Subscription - An Azure Portal account - Basic knowledge of GitHub, Python, and Azure Portal ## **Setup Steps (Encrypted Secure Version)** 1. Fork the MSO_E5_Dev_AutoRenew repository to your GitHub account. 2. Register a new application in Azure Active Directory. - Select any organization directory, select "Web" for the redirect URL, and enter "**[http://localhost:53682/](http://localhost:53682/)**" for the redirect URL. - Save the Application ID and Secret. 3. Set application permissions. - Select the following permissions: **`files.read.all`**, **`files.readwrite.all`**, **`sites.read.all`**, **`sites.readwrite.all`**, **`user.read.all`**, **`user.readwrite.all`**, **`directory.read.all`**, **`directory.readwrite.all`**, **`mail.read`**, **`mail.readwrite`**, **`mailboxsetting.read`**, and **`mailboxsetting.readwrite`**. - Grant permission for all 13 selected permissions. 4. install rclone in your system. It is required to get refresh token (one time only) 5. Execute the command **`rclone authorize "onedrive" "id" "secret"`**. - Confirm the prompt and save the refresh token. - **id** is the Application ID you get it from previous steps - **secret** is the Application secret you get it from previous steps 6. Install JsonHandle chrome extention and open it. Paste the access_token acquired from previous step in the dialog box and copy the refresh token from it 7. Keep Application ID, Secret, Refresh_token handly you will need it in the next step 8. Go to the project settings and from the left hand side menu select Secrets and Variables > Actions 9. Click **New repository secrets.** and create three variables and set the value as given below - Name: **`CONFIG_ID`** value client_id=r'your applcation_id' (within the quotes) - Name: **`CONFIG_KEY`** value client_secret=r'your_secret' - Name: **`REFRESH_TOKEN`** value refresh_token=r'your_refresh_token' 10. Goto the project setting again and choose Actions menu and scroll down until you see **Workflow permissions click Read and write permission option** 11. Go to your personal settings page on GitHub, select Developer settings > Personal access tokens > Generate new token. - Set the name to **`GITHUB_TOKEN`**. - Check the options **`repo`**, **`admin:repo_hook`**, and **`workflow`**. - Generate the token. 12. Click on the star button at the top right corner of the page to call it once. 13. Click on the Actions tab above to see the log of each run and check if the API is called correctly and if there are any errors. ## **Additional Information** - The default setting is to run three rounds every six hours from Monday to Friday. You can modify your own crontab to change the frequency and time. - If you need to modify the API calls, you can check the Graph Explorer at **[https://developer.microsoft.com/graph/graph-explorer/preview](https://developer.microsoft.com/graph/graph-explorer/preview)**. - The GitHub Action provides a virtual environment with 2-core CPU, 7 GB RAM memory, and 14 GB SSD hard disk space. - Each repository can only support 20 concurrent calls.

近期下载者

相关文件


收藏者