简体   繁体   English

访问CRM 2011点播工作流中的当前用户凭据

[英]Access current user credentials in CRM 2011 on-demand workflow

When a user runs an on-demand workflow in Microsoft CRM 2011, is it possible to access their credentials? 当用户在Microsoft CRM 2011中运行按需工作流时,是否可以访问其凭据?

I am creating a custom workflow activity designed to access a sharepoint server with shared Active Directory accounts. 我正在创建一个自定义工作流活动,旨在使用共享的Active Directory帐户访问共享点服务器。 I would like to be able to use the user who runs the on-demand workflow's credentials for Sharepoint authentication. 我希望能够使用运行按需工作流凭据的用户进行Sharepoint身份验证。 Is it possible to access these credentials in custom code? 是否可以通过自定义代码访问这些凭据? If so, how (C# if possible)? 如果是这样,怎么办(如果可能,请使用C#)?

Unfortunately it is possible to get the credentials but you won't be able to use them to authenticate to the Sharepoint Server, at least in the online versions. 不幸的是,可以获取凭据,但至少在联机版本中,您将无法使用它们对Sharepoint Server进行身份验证。

We had a similar scenario but in the end we had to use a special user to do all the work in sharepoint, we were triggering the code with a plugin and using the REST Endpoint to do the work. 我们有一个类似的场景,但是最后我们不得不使用特殊的用户来完成sharepoint中的所有工作,我们使用插件触发代码并使用REST Endpoint进行工作。

You can access the the User Credentials from the localContext, but you won't be able to retrieve the password. 您可以从localContext访问用户凭证,但是将无法检索密码。

Is your environment onpremise or online?/ 您的环境是内部部署还是在线部署?/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM