web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extract single value f...
Power Automate
Unanswered

Extract single value from onPremisesExtensionAttributes into SharePoint column?

(0) ShareShare
ReportReport
Posted on by 1,599 Super User 2024 Season 1

Hello,

I am building a flow that runs when a new MS Forms response is submitted.

 

sudosaurus_0-1635940584835.png
I have added in the Get user profile (V2) action to grab the email address of the responder.
Then I use a Compose action to get the body of the above.

sudosaurus_1-1635940617049.png

Next, I'm using this JSON this sample data in a "Parse JSON" action to separate the data from the output of the above.
Src: https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#json-representation

 

{
 "aboutMe": "String",
 "accountEnabled": true,
 "ageGroup": "String",
 "assignedLicenses": [{"@odata.type": "microsoft.graph.assignedLicense"}],
 "assignedPlans": [{"@odata.type": "microsoft.graph.assignedPlan"}],
 "birthday": "String (timestamp)",
 "businessPhones": ["String"],
 "city": "String",
 "companyName": "String",
 "consentProvidedForMinor": "String",
 "country": "String",
 "createdDateTime": "String (timestamp)",
 "creationType": "String",
 "department": "String",
 "displayName": "String",
 "employeeHireDate": "2020-01-01T00:00:00Z",
 "employeeId": "String",
 "employeeOrgData": {"@odata.type": "microsoft.graph.employeeOrgData"},
 "employeeType": "String",
 "faxNumber" : "String",
 "givenName": "String",
 "hireDate": "String (timestamp)",
 "id": "String (identifier)",
 "identities": [{"@odata.type": "microsoft.graph.objectIdentity"}],
 "imAddresses": ["String"],
 "interests": ["String"],
 "isResourceAccount": false,
 "jobTitle": "String",
 "legalAgeGroupClassification": "String",
 "licenseAssignmentStates": [{"@odata.type": "microsoft.graph.licenseAssignmentState"}],
 "lastPasswordChangeDateTime": "String (timestamp)",
 "mail": "String",
 "mailboxSettings": {"@odata.type": "microsoft.graph.mailboxSettings"},
 "mailNickname": "String",
 "mobilePhone": "String",
 "mySite": "String",
 "officeLocation": "String",
 "onPremisesDistinguishedName": "String",
 "onPremisesDomainName": "String",
 "onPremisesExtensionAttributes": {"@odata.type": "microsoft.graph.onPremisesExtensionAttributes"},
 "onPremisesImmutableId": "String",
 "onPremisesLastSyncDateTime": "String (timestamp)",
 "onPremisesProvisioningErrors": [{"@odata.type": "microsoft.graph.onPremisesProvisioningError"}],
 "onPremisesSamAccountName": "String",
 "onPremisesSecurityIdentifier": "String",
 "onPremisesSyncEnabled": true,
 "onPremisesUserPrincipalName": "String",
 "otherMails": ["String"],
 "passwordPolicies": "String",
 "passwordProfile": {"@odata.type": "microsoft.graph.passwordProfile"},
 "pastProjects": ["String"],
 "postalCode": "String",
 "preferredDataLocation": "String",
 "preferredLanguage": "String",
 "preferredName": "String",
 "provisionedPlans": [{"@odata.type": "microsoft.graph.provisionedPlan"}],
 "proxyAddresses": ["String"],
 "responsibilities": ["String"],
 "schools": ["String"],
 "showInAddressList": true,
 "signInSessionsValidFromDateTime": "String (timestamp)",
 "skills": ["String"],
 "state": "String",
 "streetAddress": "String",
 "surname": "String",
 "usageLocation": "String",
 "userPrincipalName": "String",
 "userType": "String",

 "calendar": { "@odata.type": "microsoft.graph.calendar" },
 "calendarGroups": [{ "@odata.type": "microsoft.graph.calendarGroup" }],
 "calendarView": [{ "@odata.type": "microsoft.graph.event" }],
 "calendars": [ {"@odata.type": "microsoft.graph.calendar"} ],
 "contacts": [ { "@odata.type": "microsoft.graph.contact" } ],
 "contactFolders": [ { "@odata.type": "microsoft.graph.contactFolder" } ],
 "createdObjects": [ { "@odata.type": "microsoft.graph.directoryObject" } ],
 "directReports": [ { "@odata.type": "microsoft.graph.directoryObject" } ],
 "drive": { "@odata.type": "microsoft.graph.drive" },
 "drives": [ { "@odata.type": "microsoft.graph.drive" } ],
 "events": [ { "@odata.type": "microsoft.graph.event" } ],
 "inferenceClassification": { "@odata.type": "microsoft.graph.inferenceClassification" },
 "mailFolders": [ { "@odata.type": "microsoft.graph.mailFolder" } ],
 "manager": { "@odata.type": "microsoft.graph.directoryObject" },
 "memberOf": [ { "@odata.type": "microsoft.graph.directoryObject" } ],
 "messages": [ { "@odata.type": "microsoft.graph.message" } ],
 "outlook": { "@odata.type": "microsoft.graph.outlookUser" },
 "ownedDevices": [ { "@odata.type": "microsoft.graph.directoryObject" } ],
 "ownedObjects": [ { "@odata.type": "microsoft.graph.directoryObject" } ],
 "photo": { "@odata.type": "microsoft.graph.profilePhoto" },
 "registeredDevices": [ { "@odata.type": "microsoft.graph.directoryObject" } ]
}

 

sudosaurus_2-1635940665729.png

I am now using a SharePoint Create item action to fill the required fields with data from the parsed JSON.

sudosaurus_3-1635940866831.png

 

When this flow run, it fails on the "Create item" step under the "Directorate" column where I have the onPremisesExtensionAttributes value inserted.

 

This seems to be because the onPremisesExtensionAttributes item has multiple values.

sudosaurus_4-1635941061787.png

 

What I need to do is extract the value of extensionAttribute3 and populate this into the "Directorate" column in SharePoint.

(*obviously if I was using a multi-line text column, the flow would probably complete however I dont want all the data from onPremisesExtensionAttributes just extensionAttribute3.)

 

Any ideas?

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @sudosaurus,

     

    Can you try this expression in the Directorate field?

    outputs('Parse_Json')['onPremisesExtensionAttributes']['extensionAttribute3']

     

  • chandra1 Profile Picture
    106 Power Up Champ - 2025 on at

    Hi @sudosaurus,

    have you tried using multiline column ? if yes 

    try deleting `Create item action`  and add again see if it does the job.

     

     

     

    If this post helps you with your problem, please mark your as Accepted solution. If you like my response, please give it a Thumbs Up.

    Thanks,

  • sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    @Expiscornovus this didnt work:

    sudosaurus_0-1635942750337.png


    @chandra1 I'd suggest you should read the whole post 😉 ...

    "(*obviously if I was using a multi-line text column, the flow would probably complete however I dont want all the data from onPremisesExtensionAttributes just extensionAttribute3.)"

  • Verified answer
    Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @sudosaurus,

     

    Apologies, I forgot the body part in the expression.

    outputs('Parse_JSON')['body']['onPremisesExtensionAttributes']['extensionAttribute3']

     

    Btw, in your previous screenshot I saw the space in the action name. If that is still the same you will also need to replace that by an underscore character. The expression would be outputs('Parse_Json') instead of  outputs('ParseJson')

  • chandra1 Profile Picture
    106 Power Up Champ - 2025 on at

    Sorry @sudosaurus, i just noticed "Highlighted note in red color". 

     

    i believe before adding onPremisesExtensionAttributes is an object you just have to extract value from inside key.

     

    before create item action, try using compose action and use indexing to capture nested value. 

  • sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    Thanks @Expiscornovus and @chandra1 for your help! 🙂

  • sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    Hi @chandra1 & @Expiscornovus or anyone else,

     

    I've had to revisit this post due to an issue replicating the same functionality in Azure Logic Apps.

     

    Unfortunately when I use the expression "@{outputs('ParseJSON')['body']['onPremisesExtensionAttributes']['extensionAttribute3']}", I receive this error message:

     

    InvalidTemplate. Unable to process template language expressions in action 'Create_item' inputs at line '1' and column '3596': 'The template language expression 'body('ParseJSON')['body']['onPremisesExtensionAttributes']['extensionAttribute3']' cannot be evaluated because property 'body' doesn't exist, available properties are '@odata.context, displayName, jobTitle, department, employeeId, onPremisesExtensionAttributes'. Please see https://aka.ms/logicexpressions for usage details.'.

    It should work as it's able to retreive the extensionAttribute3 information correctly!

    Here's my flow:

    sudosaurus_0-1642083817425.png
    sudosaurus_1-1642083871005.png

    sudosaurus_2-1642083965639.png

    sudosaurus_3-1642083991711.png

     

     

  • Verified answer
    Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @sudosaurus,

     

    It looks like Power Automate has converted your earlier expression to 

    body('ParseJSON')['body']['onPremisesExtensionAttributes']['extensionAttribute3']

     

    Since it has the body twice, it doesn't like it. Can you try this instead:

    body('ParseJSON')['onPremisesExtensionAttributes']['extensionAttribute3']



    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel
  • sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    Thanks @Expiscornovus that was the winning solution! 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard