文章目录[隐藏]
先来个主要网站直通车:
Mierosoft 365 E5开发者账号申请 微软 Microsoft Azure门户网站微软 SharePoint 管理中心office官网GitHub 官网GitHub PTA密钥申请自动续期项目 GitHub 地址
一:免费注册e5管理员账号,试用期3个月。
1、首先打开下面网址,使用微软账户(没有的话注册一个)进行账户登陆。

使用微软账户登录成功后,就开始注册E5账户了。

这里选择“供我公司内部使用的应用程序“,下一步。

选择“可配置沙盒”,下一步。

这里的“用户名”和“域“,随意编一个,设置好“密码”,继续。由于密码比较复杂,建议用记事本记录一下,后面会用到。

使用电话号码验证一下。


二、禁用安全默认值,后面自动续期时才不会失败,这一步是必须操作的。
打开Azure门户,使用E5管理员账户密码登录


点击“管理安全默认值”。把右侧的开关置于“否”,然后点击“保存”。

三、白嫖5T OENDRIVE 云盘空间
进入SharePoint 管理中心网站
调整容量:注册好的账户,默认只有1TB的空间,实际上最大赠送5TB。我们改一下设置即可。打开网址,点击“设置”,将下面的默认选项,设置为5120GB,点击“保存”。至此,刚刚获取的E5管理员账户就有5TB免费的空间了。

四、GitHub 上创建PAT 密钥
本节目的是获取一个具有workflow权限的PAT密钥。
PAT是Github的个人访问令牌。需要有一个GitHub账号,
没有的话先注册:GitHub 官网
然后,进入以下地址:GitHub PTA密钥申请
来到下面的页面,设置如下,注意务必勾选workflow。


然后就得到了PAT密钥,务必注意复制到记事本中备用,如果这里不记下来,再进此页面就看不到了。如果真的看不到了,可以删除再新建一个。

至此,总共获取到了3个信息:E5管理员账号、E5管理员密码、PAT密钥。务必牢记!务必牢记!务必牢记!
五:使用自动续期程序
本节的目的是将开源项目的源代码导入自己的Github仓库中,即复制一份。然后把E5管理员账户/密码、PAT密码信息,设置到仓库里面,以便程序自动执行续期功能。
打开自动续期项目地址:自动续期项目 GitHub 地址
点击右上角“+”→Import repository,即可一键导入!

在下图的Your old repository’s clone URL中填写:
https://github.com/vcheckzen/KeepAliveE5.git
自定义一个名称,我这里随便起了个名字:365E5
勾选“Private”,表示私人。最后点击“Begin import”。

至此源代码成功导入自己的Github仓库!
切换到上面创建的365E5仓库的“Settings”选项下


找到Secrets and variables→Actions,点击New repository sectret。新建三条内容如下:
- PAT的值为上文申请的PAT密钥;
- USER的值为申请的E5管理员账号,支持多个,每行一个。
- PASSWD的值为E5管理员账户密码,支持多个,每行一个。注意和USER值顺序一致。




开启Actions选项
- 注:如果找不到Actions选项,按下图开启。Settings→Actions→General→Allow all actions and reusable workflows→Save。

切换到Actions选项下,选择Register APP,然后点击Run workflow。

大约等待几分钟执行完毕。如果是绿色√,没有报错,表示执行成功。同样的方法,再执行一下Invoke APP,有时候需要多执行几次才成功,不要慌!


有一些人执行自动续期时失败,提供几个解决方法如下: