cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

Dynamics 365 oData Query with Expanded Entities treated as Strings

Hi,

 

I am using the following query "[ORGURL]/api/data/v8.2/contacts?$select=fullname&$expand=owninguser($select=fullname)" with the list records (v2) action in order to get a list of contacts and the name of the owning user. However, the object that contains the user field fullname is being treated as a string value by Flow so it is not selectable in the Dynamic Values list. 

 

The response is similar to the below when viewed in browser:

 

{
  "@odata.context":"https://ORGNAME/api/data/v8.2/$metadata#contacts(fullname,owninguser,owninguser(fullname))","value":[
    {
      "@odata.etag":"W/\"115389388\"","fullname":"Bob Smith","contactid":"356cd10f-128f-e711-811a-5065f38aba21","owninguser":{
        "fullname":"Main User"
      }
    },{
      "@odata.etag":"W/\"115389389\"","fullname":"Dave Smith","contactid":"22eaf71c-128f-e711-811a-5065f38aba21","owninguser":{
        "fullname":"Main User"
      }
    },{
      "@odata.etag":"W/\"115454390\"","fullname":"Kelly Smith","contactid":"766c2b6e-ae93-e711-8113-5065f38ba451","owninguser":{
        "fullname":"Secondary User"
      }
    },{
      "@odata.etag":"W/\"115554225\"","fullname":"Danny Smith","contactid":"2b8be175-ae93-e711-8113-5065f38ba451","owninguser":{
        "fullname":"Secondary User"
      }
    }
  ]
}

 

However, in flow it appears as:

 

[
{
"@odata.etag": "",
"fullname": "Bob Smith",
"owninguser": "{\r\n \"fullname\": \"Main User\"\r\n}",
},
{
"@odata.etag": "",
"fullname": "Dave Smith",
"owninguser": "{\r\n \"fullname\": \"Main User\"\r\n}",
}, 
{
"@odata.etag": "",
"fullname": "Kelly Smith",
"owninguser": "{\r\n \"fullname\": \"Secondary User\"\r\n}",
},
{
"@odata.etag": "",
"fullname": "Danny Smith",
"owninguser": "{\r\n \"fullname\": \"Secondary User\"\r\n}",
}
]

 

Is there any other way that I can get hold of the User fullname without using a second query (as this already exists within a foreach so I can't use any more loops).

 

Thanks

 

Lee


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


2 REPLIES 2
Community Support Team
Community Support Team

Re: Dynamics 365 oData Query with Expanded Entities treated as Strings

Hi @LeeHarris,

 

I will try to involve others who is more fimilar with this kind of issue to have a look at it.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User
Super User

Re: Dynamics 365 oData Query with Expanded Entities treated as Strings

Hi @v-monli-msft

 

Thanks, ideally if there was some way to access the linked entity data using the dynamic entities that would be perfect.

 

Lee


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (3,795)