我需要从Mule读取和编写SharePoint列表。
安装程序如下:Mule 3.6,SharePoint online 2013,内部部署ADFS。
对SharePoint的Web访问工作,用户通过以下URL序列:
https://[company].sharepoint.com/sites/.../Collab/...
https://login.microsoftonline.com/login.srf?...
https://adfs.[company].com/adfs/ls/?...
login.microsoftonline.com
,最后到[company].sharepoint.com
,我可以在那里查看列表。在Mule中,我在"声明连接"中使用了SharePoint 2013连接器。模式。
配置如下:
<sharepoint:claims-connection-config
disableCnCheck="true"
name="Microsoft_SharePoint_2013__Claims_Connection"
username="[user email]"
password="[password]"
siteUrl="https://[company].sharepoint.com/sites/[site]/"
stsUrl="https://adfs.[company].com/adfs/services/trust/13/usernamemixed"
scope="urn:federation:MicrosoftOnline"
doc:name="Microsoft SharePoint 2013: Claims Connection"
/>
参数&#34;范围&#34;是从adfs.[company].com/adfs/ls/?...
网址的参数wtrealm中找到的。
我尝试执行的操作如下:
<sharepoint:list-get
config-ref="Microsoft_SharePoint_2013__Claims_Connection"
doc:name="Microsoft SharePoint 2013"
listId="F93EF42E-1FAF-4CB3-8D7F-EBFC76CBDB3C"
/>
列表ID是从网络上找到的,用户可以访问该列表。
点击&#34;测试连接&#34;在运行流程时,我得到以下异常:
org.mule.api.ConnectionException: Code: 403 Message: {"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to perform this action or access this resource."}}}
at org.mule.module.sharepoint.connection.BaseSharepointConnectionStrategy.connect(BaseSharepointConnectionStrategy.java:83) ~[?:?]
at org.mule.module.sharepoint.connectivity.ClaimsConnectionStrategySharepointConnectorAdapter.connect(ClaimsConnectionStrategySharepointConnectorAdapter.java:21) ~[?:?]
at org.mule.module.sharepoint.connectivity.ClaimsConnectionStrategySharepointConnectorAdapter.connect(ClaimsConnectionStrategySharepointConnectorAdapter.java:9) ~[?:?]
at org.mule.devkit.3.6.1.shade.connection.management.ConnectionManagementConnectorFactory.makeObject(ConnectionManagementConnectorFactory.java:47) ~[?:?]
at org.mule.devkit.3.6.1.shade.connection.management.ConnectionManagementConnectorFactory.makeObject(ConnectionManagementConnectorFactory.java:15) ~[?:?]
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220) ~[commons-pool-1.6.jar:1.6]
at org.mule.module.sharepoint.connectivity.SharepointConnectorClaimsConnectionConfigConnectionManagementConnectionManager.acquireConnection(SharepointConnectorClaimsConnectionConfigConnectionManagementConnectionManager.java:269) ~[?:?]
at org.mule.module.sharepoint.connectivity.SharepointConnectorClaimsConnectionConfigConnectionManagementConnectionManager.acquireConnection(SharepointConnectorClaimsConnectionConfigConnectionManagementConnectionManager.java:58) ~[?:?]
at org.mule.devkit.3.6.1.shade.connection.management.ConnectionManagementProcessInterceptor.execute(ConnectionManagementProcessInterceptor.java:47) ~[?:?]
at org.mule.devkit.3.6.1.shade.connection.management.ConnectionManagementProcessInterceptor.execute(ConnectionManagementProcessInterceptor.java:19) ~[?:?]
at org.mule.security.oauth.process.RetryProcessInterceptor.execute(RetryProcessInterceptor.java:84) ~[mule-module-devkit-support-3.6.0.jar:3.6.0]
at org.mule.devkit.3.6.1.shade.connection.management.ConnectionManagementProcessTemplate.execute(ConnectionManagementProcessTemplate.java:33) ~[?:?]
...
调查显示,此异常实际上并非Mule从SharePoint获得的第一个错误。
连接到https://adfs.[company].com/adfs/services/trust/13/usernamemixed/
并获取令牌后,Mule会对https://[company].sharepoint.com/sites/.../_trust/
执行POST。该URL以HTTP 200 OK回答,但是HTML包含&#34;抱歉,出了点问题&#34;和&#34;发生意外错误&#34;消息。
不知道为什么,也许是因为代码200,Mule忽略了这一点并继续向https://[company].sharepoint.com/sites/.../_api/web/id
发出GET请求,这会返回上面提到的403异常。
非常感谢您对此连接过程进行故障排除的任何帮助。
答案 0 :(得分:0)
2015-10-06发布的最新Microsoft SharePoint 2013连接器2.1.8版终于能够与来自本地AD FS的用户连接到SharePoint Online。
就个人而言,我使用了“在线”配置类型。不确定claim-type auth。