cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (44,559)