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
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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 (5,869)