cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
leolsdn
Helper I
Helper I

GET ID from response body

Hello, 

I've made the following REST call to SharePoint:

 

REST1.png

When the flow is executed, I get the ID of the user in the body response:

IDREST1.png

 

How can I get only the value of the ID from this response body so that I can use it in a variable.

 

Thanks.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Found:

 

found1.png

 

Formula is:

body('action')['d']['id]

 

found2.png

 

View solution in original post

2 REPLIES 2
leolsdn
Helper I
Helper I

Here is the whole body:

 

{
  "d": {
    "__metadata": {
      "type""SP.User"
    },
    "Alerts": {
      "__deferred": {
      }
    },
    "Groups": {
      "__deferred": {
      }
    },
    "Id"6,
    "IsHiddenInUI"false,
    "LoginName""i:0#.f|membership|admin@andreir4040.onmicrosoft.com",
    "Title""Andrei Rachita",
    "PrincipalType"1,
    "Email""admin@andreir4040.onmicrosoft.com",
    "Expiration""",
    "IsEmailAuthenticationGuestUser"false,
    "IsShareByEmailGuestUser"false,
    "IsSiteAdmin"true,
    "UserId": {
      "__metadata": {
        "type""SP.UserIdInfo"
      },
      "NameId""10032000d55bb8f7",
      "NameIdIssuer""urn:federation:microsoftonline"
    },
    "UserPrincipalName""admin@andreir4040.onmicrosoft.com"
  }
}

Found:

 

found1.png

 

Formula is:

body('action')['d']['id]

 

found2.png

 

View solution in original post

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (52,068)