与Office 365凭据在线SharePoints
我正在尝试通过使用Office 365的加速凭据来从我的.NET应用程序(在这种情况下为VSTO PowerPoint com addin)连接到SharePoint在线。
我可以使用SharePointonLine.csom套件建立我的连接服务器URL和我的凭据。
ClientContext oCtx = new ClientContext(sUrl);
System.Security.SecureString oPassword = new System.Security.SecureString();
foreach (char cPwd in sPassword)
oPassword.AppendChar(cPwd);
oCtx.Credentials = new SharePointOnlineCredentials(sUsername, oPassword);
oCtx.ExecuteQuery();
但是,我不希望用户在我的应用程序中输入密码。我希望使用Active Office 365凭据。我的研究将我带到了我下载的PNP.Framework软件包。但是,如果没有用户名/密码或clientId和客户端的连接方式,我找不到一种连接的方法。
是否有任何方法可以通过使用存储的Office 365凭据来单个签名来在线? c#或vb.net没关系,对我来说都可以。
非常感谢!
I am trying to connect to a Sharepoint online from my .NET application (in this case VSTO powerpoint COM addin) by using the cached credentials of Office 365.
I can establish my connection using the SharepointOnline.CSOM package and creating a ClientContext by providing the server URL and my credentials.
ClientContext oCtx = new ClientContext(sUrl);
System.Security.SecureString oPassword = new System.Security.SecureString();
foreach (char cPwd in sPassword)
oPassword.AppendChar(cPwd);
oCtx.Credentials = new SharePointOnlineCredentials(sUsername, oPassword);
oCtx.ExecuteQuery();
However, I do not want the user to enter the password in my application. I would prefer to make use of the active Office 365 credentials. My research brought me to the PnP.Framework package which I downloaded. However I cannot find a way to connect without username/password or the clientID and clientSecret.
Is there any way for a Single Sign On to Sharepoint Online by using stored Office 365 credentials? C# or VB.NET does not matter, both ok for me.
Thank you very much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论