在2013工作流程中使用REST更改安全组名称(标题) [英] Change Security Group Name(Title) using REST in 2013 Workflow

查看:101
本文介绍了在2013工作流程中使用REST更改安全组名称(标题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


https://msdn.microsoft.com/en-us/library/office/dn531432.aspx

https://msdn.microsoft.com/en-us/library/office/dn531432.aspx


探索了上面描述安全组REST选项的页面,但是我不知道如何形成一个http调用(调用操作)以更改SharePoint 2013工作流中安全组的名称。

Having explored the above page describing the REST options for security groups, but it is NOT clear as to how I would form an http call (Call Action) to change the name of the security group in a SharePoint 2013 workflow.


这是伪代码我要试试实现到2013工作流程:

Here's the pseudo-code I'm going to try to implement into a 2013 Workflow:


1.构建dicPOSTRequestHeaders字典

接受String application / json; odata = verbose

content-type字符串application / json; odata =详细信息

X-HTTP-Method  String   MERGE



2.构建dicPOSTMetaData字典

类型字符串SP。组



3.构建dicPOSTParams字典 

__metadata字典变量:dicPOSTMetaData

标题字符串{新组名称}



4.应用步骤

致电

https://mydomain.sharepoint.com / mySite / _api / web / sitegroups / getByName('{Old Group Name}')

with b
变量:dlcPOSTParams

1. Build dicPOSTRequestHeaders dictionary
Accept String application/json;odata=verbose
content-type String application/json;odata=verbose
X-HTTP-Method  String   MERGE

2. Build dicPOSTMetaData dictionary
type String SP.Group

3. Build dicPOSTParams Dictionary 
__metadata Dictionary variable:dicPOSTMetaData
Title String {New Group Name}

4. App Step
Call
https://mydomain.sharepoint.com/mySite/_api/web/sitegroups/getByName('{Old Group Name}')
with
Variable:dlcPOSTParams


其他呼叫属性:

Other Call Properties:


  RequestType HTTP POST

  RequestHeaders dicPOSTRequestHeaders

  RequestContent dicPOSTParams


  ResponseStatusCode sPOSTResponseCode



如果sPOSTresponseCode等于NoContent

 记录"成功"

否则

 记录"失败"

  RequestType HTTP POST
  RequestHeaders dicPOSTRequestHeaders
  RequestContent dicPOSTParams
  ResponseStatusCode sPOSTResponseCode

If sPOSTresponseCode equal NoContent
  Log "Success"
Else
  Log "Fail"


到目前为止,我得到了"BadRequest"作为响应代码,这是超级信息。

So far, I get "BadRequest" as the Response Code, which is super informative.


非常感谢任何帮助。

Any assistance is greatly appreciated.


谢谢,

Steve Clark ,MCTS

北弗吉尼亚州Easy Bins滚装垃圾箱租赁服务

专长:

车道大小,滚动在Fairfax VA出租垃圾箱 |

Dumpster弗吉尼亚州斯普林菲尔德的Junk Hauling出租


Roll在弗吉尼亚州安嫩代尔出租自卸车

Steve Clark, MCTS
Easy Bins Roll-off Dumpster Rentals in Northern VA
Specializing in:
Driveway-sized, roll-off dumpster rentals in Fairfax VA | Dumpster Rentals for Junk Hauling in Springfield VA
Roll-off Rental Dumpsters in Annandale, VA

推荐答案

我按照您的步骤使用REST API创建设计器工作流程以更改组名称,并且它可以正常工作。

I follow your steps to create a designer workflow with REST API to change the group name, and it works.

请检查您的组名是否是装备ht。

Please check if your group name is right.

您可以直接使用浏览器访问其余的api以检查它是否有效。

You can access the rest api using browser directly to check if it works.

https://mydomain.sharepoint.com/mySite/_api/web/sitegroups/getByName('{Old Group Name}')

最好的问候,

Dennis


这篇关于在2013工作流程中使用REST更改安全组名称(标题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆