本文介绍了如何从Web Service获取SharePoint Secure存储凭据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Guys,

Hello Guys,

我们有一个SharePoint 2013 On perm环境,我们存储所有Secure Store凭据(用户ID和密码)。 SharePoint环境只是说(服务器A)

We have a SharePoint 2013 On perm environment where we store all our Secure Store credentials (user id and password). SharePoint environment just say as (Server A)

我们最近开发了一个新的Web服务并托管在非共享点服务器(比如服务器B)中。此Web服务是使用.net core 2.2开发的。

we recently developed a new web service and hosted in non share point server (say server B). This web service is developed using .net core 2.2.

我正在尝试连接到SP2013并从服务器B到服务器A的SS服务获取凭据

I'm trying to connect to SP2013 and get credentials from SS Service from server B to Server A

由于Web服务托管在非共享点环境中,因此需要采取哪些步骤才能从SharePoint获取凭据。 

since web service is hosted in non share point environment, what steps do i need to take in order to take to get credentials from SharePoint. 

是否有任何人遇到此问题情景类型?

Did any one came across this type of scenario ?

请给我提供一些选择。

谢谢

推荐答案

在这个例子中,我没有指出你不知道SharePoint网站的有效用户ID和密码。然后,您希望从SharePoint Server获取它并在外部项目中使用。

In this seenario, I undestand you did't know valid user id and password for SharePoint sites. Then you want to get it from SharePoint Server and used in your outside project.

关键点是SharePoint不会在Secure Store Service中返回用户凭据,而是返回访问令牌和表单用于身份验证的请求标头中的摘要。因此无法直接在服务器外部直接形成用户credenatil。

Key point is SharePoint won't return user credential within Secure Store Service, instead it will return access token and form digest in request header for authentication. So can't get user credenatil directly form outside server directly.

一种解决方法是,您可以将用户ID和密码存储在SQL Datatable中并加密以确保安全,这些凭据都是域用户凭证,在代码片段中,您可以直接读取数据库以获取凭证并用于身份验证
,例如Rest API:

A workaround is that you could store the user id and password in a SQL Datatable and encrypt it for secure, these credentials are all domain user credentail, in the code snippet, you could directly read database to get credential and use for authentication for example Rest API:

SharePoint 2013 REST API中授权问题的一些帮助

谢谢

最好的问候


这篇关于如何从Web Service获取SharePoint Secure存储凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 01:33