Extract ID of user on workflow 2013 - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Extract ID of user on workflow 2013

Last post 03-29-2019 04:45 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-29-2019 09:56 AM

    • dan508
    • Not Ranked
    • Joined on 07-12-2018
    • Posts 7

    Extract ID of user on workflow 2013

    Hi all. I'm almost there, but I need assistance on this last bit. I'm running the following on the workflow to putt the details in for a certain user: _/api/web/siteusers$filter=Title%20%27[%Variable:Employee Name%]%27. I then call the http service using this and I get the following results: {"odata.metadata":"https:\/\/instarnet.instarmac.co.uk\/hr\/_api\/$metadata#SP.ApiData.Users1","value":[{"odata.type":"SP.User","odata.id":"https:\/\/instarnet.instarmac.co.uk\/hr\/_api\/Web\/GetUserById(138)","odata.editLink":"Web\/GetUserById(138)","Id":138,"IsHiddenInUI":false,"LoginName":"i:0#.w|trinity\\danielh","Title":"Daniel Harris","PrincipalType":1,"Email":"danielh@instarmac.co.uk","IsShareByEmailGuestUser":false,"IsSiteAdmin":false,"UserId":{"NameId":"s-1-5-21-1409082233-1644491937-725345543-4898","NameIdIssuer":"urn:office:idp:activedirectory"}},{"odata.type":"SP.User","odata.id":"https:\/\/instarnet.instarmac.co.uk\/hr\/_api\/Web\/GetUserById(3)","odata.editLink":"Web\/GetUserById(3)","Id":3,"IsHiddenInUI":false,"LoginName":"TRINITY\\danielh","Title":"Daniel Harris","PrincipalType":1,"Email":"danielh@instarmac.co.uk","IsShareByEmailGuestUser":false,"IsSiteAdmin":false,"UserId":{"NameId":"S-1-5-21-1409082233-1644491937-725345543-4898","NameIdIssuer":"urn:office:idp:activedirectory"}}]} How Can I extract the user ID only? (138) I will then use this workflow to add an explicit permission for the user against an item. Thanks, Dan
  • 03-29-2019 04:45 PM In reply to

    Re: Extract ID of user on workflow 2013

    This might help - it is a post on how to read JSON which is what is being returned from your web service call: https://sharepoint.stackexchange.com/questions/137890/how-to-read-json-output-in-sharepoint-designer-workflow
    Hilary Stoupa

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.