Hello Community !
I do have a challenge as processing data after receiving it from an HTTP Request in Power Automate :
I do list Connexion IDs available on a specific user on Apache/Guacamole and I want to remove it from the user through a power automate flow.
Unfortunatly I can't loop on those values as they seems to be properties, so parsing it through Parse JSON does not make sense as the result will change everytime the flow runs cause it will be a different user and thus the Connexion IDs
here is the HTTP response :
{
"connectionPermissions": {
"418": [
"READ"
],
"419": [
"READ"
],
"424": [
"READ"
],
"425": [
"READ"
],
"426": [
"READ"
],
"427": [
"READ"
],
"428": [
"READ"
],
"429": [
"READ"
],
"430": [
"READ"
],
"431": [
"READ"
],
"432": [
"READ"
],
"433": [
"READ"
],
"559": [
"READ"
],
"590": [
"READ"
],
"591": [
"READ"
],
"592": [
"READ"
],
"593": [
"READ"
]
},
"connectionGroupPermissions": {
"49": [
"READ"
]
},
"sharingProfilePermissions": {},
"activeConnectionPermissions": {},
"userPermissions": {
"TEAM2": [
"READ"
]
},
"userGroupPermissions": {},
"systemPermissions": []
}
I'm sad cause my Connexion ID is actually a property on the JSON and I cannot use it as dynamics values, in the response: 418, 419 .... are the data I want to use cause it is the connexion reference, and then I can remove it from the user profile.
I cannot extract this value to use it in my flow unfortunatly
I'm now trying through XPATH to manage it as XML object, but my expression is not working :
xpath(xml(variables('DelConUser')), '/connectionPermissions/*')
I get the error :
Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template language function 'xml' parameter is not valid. The provided value cannot be converted to XML: 'JSON root object has multiple properties. The root object must have a single property in order to create a valid XML document. Consider specifying a DeserializeRootElementName. Path 'outputs.591'.'. Please see https://aka.ms/logicexpressions#xml for usage details.'.
Can I get some help from you on this specific topic ?
Have a good one !