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
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

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (77,456)