微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

连接到onedrive

如何解决连接到onedrive

我要将超过 1000 个帐户的文件文件服务器迁移到 OneDrive。 (不能使用迁移工具)。我在 OneDrive 中获得了管理员权限,可以创建/编辑文件夹等。

 #Add required references to SharePoint client assembly to use CSOM 
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")  

# Specify local folder path
$LocalFolder = "C:\test"

# Specify the User account for an Office 365 global admin in your organization
$AdminAccount = "admin@MY_ACCT_W_PERMS.onmicrosoft.com"
$AdminPass = "MY_SUPA_DUPA_SECRET_PWD"

# Specify User's OneDrive Site URL and Folder name
$OneDriveURL = "https://OurCompany-my.sharepoint.com/personal/name_domain_com"

$DocumentLibrary ="Documents"
$TargetFolderName ='' #Leave empty to target root folder

#Connect and Load OneDrive Library and Root Folder
$SecPwd = $(ConvertTo-securestring $AdminPass -asplaintext -force) 
$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($OneDriveURL) 
$Credentials = New-Object 
Microsoft.SharePoint.Client.SharePointOnlineCredentials($AdminAccount,$SecPwd) 
$Ctx.credentials = $Credentials
$List = $Ctx.Web.Lists.GetByTitle($DocumentLibrary)
$Ctx.Load($List)
$Ctx.Load($List.RootFolder)
$Ctx.ExecuteQuery()

等等...

我收到错误: 使用“0”参数调用“ExecuteQuery”的异常:“身份客户端运行时库 (IDCRL) 无法查找联合登录的领域信息。"

我们有 MFA,我发现一些建议从 cmdlet 中删除 -credentials 参数,这样它就会提示输入 weblogin,但是怎么做????我迷路了。感谢帮助

解决方法

好吧,好像和权限有关,好像管理员不小心撤销了我在 OneDrive 中的权限

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?