Search code examples
microsoft-graph-apipowerappspowerapps-canvaspowerapps-formulapowerapps-collection

How i cant iterate a json object in power apps without use power automate


I have a custom connector with microsoft graph api in my power apps and i have a request and a response with graph explorer, now my problem is they i can't iterate the object in my power apps table.

OnSelect code: UpdateContext({getrols:graph_demo.GetRols()})

Issue shown in PowerApps

View of API Response


Solution

  • You may try adding .value to the end of your formula. You'd likely then add .appRoles to .value to get into the nested JSON.

    When in doubt, add a . to your formula and leverage the IntelliSense to explore your response schema.

    Something like: ClearCollect(coRols, graph_demo.GetRols().value.appRoles)

    Also, try using a Gallery to show the response instead of a ListBox. Set the Gallery Items property to colRols.