Power Automate绑定OneDrive遭权限拒绝问题及本地迁移解决方案
OneDrive账户登录Power Automate遇「权限拒绝」的临时恢复方案
许多用户使用OneDrive账户登录Power Automate时会触发「权限拒绝(Access Denied)」错误,可能导致完全无法登录,或登录后流无法正常运行。经排查,该问题源于OneDrive服务器对部分账户限制了Power Automate的访问权限(使用Outlook账户则可正常操作)。
若需在等待官方客服支持期间恢复流运行,可采用以下临时方案:
1. 获取本地原始数据
前往路径 C:\Users[USERNAME]\AppData\Local\Microsoft\Power Automate Desktop\Console\Workspace,每个文件夹对应一个本地存储的流。进入两层目录后,可找到三个核心文件:
controlRepo.appmask:存储UI元素信息imageRepo.imgrepo:存储流中用到的截图script.robin:流的实际运行代码
2. 迁移UI元素与截图至新流
需逐个迁移文件,建议顺序:imageRepo.imgrepo > controlRepo.appmask > script.robin
步骤2.1 创建预处理流
新建一个Power Automate流,复制以下代码并粘贴:
Clipboard.GetText Text=> ClipboardText Text.Replace Text: ClipboardText TextToFind: $'''\\''' IsRegEx: False IgnoreCase: False ReplaceWith: $'''\\\\''' ActivateEscapeSequences: False Result=> ClipboardText Text.Replace Text: ClipboardText TextToFind: $'''\"''' IsRegEx: False IgnoreCase: False ReplaceWith: $'''\\\"''' ActivateEscapeSequences: False Result=> ClipboardText Text.SplitText.Split Text: ClipboardText StandardDelimiter: Text.StandardDelimiter.NewLine DelimiterTimes: 1 Result=> TextList Text.JoinText.JoinWithCustomDelimiter List: TextList CustomDelimiter: $'''\\r\\n''' Result=> JoinedText
步骤2.2 处理并导入文件内容
- 用记事本打开
imageRepo.imgrepo,全选复制内容后运行上述预处理流,将生成的JoinedText复制到下方模板的[PASTE your imageRepo.imgrepo HERE]位置; - 重复上述操作,处理
controlRepo.appmask并粘贴到模板的[PASTE your controlRepo.appmask HERE]位置:
Display.ShowMessageDialog.ShowMessage Title: $'''test''' Message: $'''test''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed # [ControlRepository][PowerAutomateDesktop] { "ControlRepositorySymbols": [ { "IgnoreImagesOnSerialization": false, "Repository": "[PASTE your controlRepo.appmask HERE]", "ImportMetadata": { "DisplayName": "Local computer", "ConnectionString": " 廊yn strikes BL [ Compareopt弹 highlygate incorporates &#庄, 流恢复", "Type": "Local", "DesktopType": "local" }, "Name": "appmask" } ], "ImageRepositorySymbol": { "Repository": "[PASTE your imageRepo.imgrepo HERE]", "ImportMetadata": {}, "Name": "imgrepo" }, "ConnectionReferences": [] }
步骤2.3 导入模板到新流
复制上述完整模板内容,在Power Automate中新建流并粘贴,之后可删除主流中的弹窗步骤。
3. 导入主流程与子流程代码
- 无子流程情况:打开
script.robin,复制@SENSITIVE: []之后的所有内容,粘贴到Power Automate的主流程中; - 有子流程情况:先创建与原流同名的子流程,再复制
script.robin中FUNCTION [YOUR SUB FLOW NAME] GLOBAL与END FUNCTION之间的代码,粘贴到对应子流程中,重复此操作完成所有子流程的迁移。
内容的提问来源于stack exchange,提问作者Jason-Manh Tran
相关产品推荐
相关产品推荐

