menu LittleJake's Blog
color_lens
avatar
Jake Liu
Never Settle
creative commons by-nc-sa
hit
Category
keyboard_arrow_down

© 2024 LittleJake's Blog.

萌ICP备20223020号

获取微软Office 365应用APPID、secret、access_token、refresh_token等

获取APPID

  1. 使用Office365订阅的管理员账号登陆Azure Portal
  2. 点击页面 Azure Active Directory管理 → 左侧 应用注册新注册

Azure Active Directory
应用注册
新注册

  1. 根据需要填写相关信息
    相关信息
  2. 记录APPID

新建权限

  1. 点击页面左侧 API权限添加权限
    API权限
    添加权限
  2. 选择所需的权限,如Graph下的所有ReadAll和ReadWrite
  3. 点击 代表XX授予管理员权限 保存权限
    代表XX授予管理员权限

新建API密钥

  1. 点击页面左侧 证书和密码新客户端密码
    API密钥
  2. 根据需要添加,记录secret

获取refresh_token

  1. 在Azure控制台,添加身份验证添加平台WEB,输入http://localhost:53682/
    身份验证
  2. 下载 Rclone,解压
  3. 在解压后目录下,按着shift点鼠标右键,选择在此处打开powershell窗口,弹出窗口后执行
    .\rclone authorize "onedrive" "记录的APPID(client_id)" "记录的API密钥(secret)"
  4. 在弹出的浏览器窗口登录账号
  5. 回到powershell窗口,复制出一段json数据,取到access_tokenrefresh_token
    access_token
    refresh_token
Buy me a beer
Jake Liu
Never Settle

Title: 获取微软Office 365应用APPID、secret、access_token、refresh_token等

Author: Jake Liu

Origin:

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) For any re-post you must give appropriate credit.

文章遵循CC许可 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 转载请注明出处

Tag:OFFICE365, API, access_token, secret, client_id, refresh_token

评论区

Add a new comment.

Theme