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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Missing Properties in ...
Power Apps
Unanswered

Missing Properties in Collection when calling custom REST API Connector

(0) ShareShare
ReportReport
Posted on by 7
Hi everyone,
 
I'm quite new to working with custom connectors and stumbled upon something could need a bit of assistance with 🙂
 
I created a custom connector for azure lab services from an openapi definition which I want to use inside a PowerApp. The connector Seems to be working fine. However, when calling it from inside my app, the collection does not seem to contain all properties. 
 
Here is what I get when running the test from the connector: (x'ed out some values)
{
  "value": [
    {
      "properties": {
        "maxUsersInLab"1,
        "userQuota"400,
        "invitationCode""xxx",
        "createdByObjectId""xxx",
        "usageQuota""PT10H",
        "userAccessMode""Restricted",
        "createdByUserPrincipalName""xxx",
        "createdDate""xxx",
        "provisioningState""Succeeded",
        "uniqueIdentifier""xxx",
        "latestOperationResult": {}
      },
      "id""xxx",
      "name""xxx",
      "type""Microsoft.LabServices/labAccounts/labs",
      "location""xxx"
    }
  ]
}
 

When using the same call from inside the app, the resulting collection only contains the "properties" object, but is missing id, name, type and location

2020-04-22 11_48_30-Window.png

2020-04-22 11_56_20-Window.png

2020-04-22 11_57_22-Window.png

 
Any Idea on why the properties are missing in the collection? Is there a way to inspect the results outside of a collection?
 
Thanks & Regards
Fabian
Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @ffcloud-bskies ,

    Could you please share a bit more about the Response JSON Schema you defined for this action within your custom connector?

     

    Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Please make sure you have defined proper Response JSON Schema for this action within your custom connector:

    2.JPG

     

    Then you could edit these properties under the Response Body, please make sure you do not set Visibility property of the id, name, type and location property to "internal", instead, you could set the Visibility property of these missed properties to "important":

    4.JPG

     

    If the issue still exists, please consider create a new custom connector from scratch based on your REST API. Then specify proper action within this custom connector, and define proper Response JSON Schema for this action, then check if the issue is fixed.

     

    More details about creating custom connector in PowerApps, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/register-custom-api

     

    Best regards,

  • ffcloud-bskies Profile Picture
    7 on at

    Hi @v-xida-msft,

    Thank you very much for your reply. This helped a lot. 

     

    I basically need a connector for Azure Lab Services. So as I didn't find an existing connector supporting Lab Services, I took the API definition from GitHub (https://github.com/Azure/azure-rest-api-specs/tree/master/specification/labservices/resource-manager/Microsoft.LabServices/stable/2018-10-15) and used it to create a custom connector.

     

    What I found out is, that "Lab" definition amongst some others references "Resource" definition, which defines the properties I'm missing in the resulting PowerApps collection when executing the query.

    2020-04-23 13_46_46-Swagger Editor and 57 more pages - 2 Bright Skies - Microsoft​ Edge.png

    This seems not being resolved by PowerApps. Replacing the reference with the actual properties from Resource definition solved the issue.

    So for now I will get it to work as intended, hence modifying the schema and replacing nested references that cannot be resolved.

    Do you know if this is known and might be changed in the future? In general it seems to be a supported scenario in OpenAPI (swagger seems to successfully resolve all references)

     

    Thanks & Regards

    Fabian

     

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @ffcloud-bskies ,

    Do you want to define the Response Body within your custom connector OpenAPI definition file via $ref?

     

    Based on what I have known, I think you could define reference for the specific action in your OpenAPI definition file via $ref key.  But based on the "Lab" definition structure that you mentioned, I think there is something wrong with it.

     

    If you want to defined a Response Body for a specific action in your custom connector via $ref key, the standard OpenAPI definition structure should be as below:

    responses:
     200:
     description: A User object
     schema:
     $ref: '#/definitions/User'
    definitions:
     User:
     type: object
     properties:
     id:
     type: integer
     description: The user ID.
     username:
     type: string
     description: The user name.

    You should specify the Schema inline the Operation, and then use $ref key to reference the Response definition. Please check the following article for more details:

    https://swagger.io/docs/specification/2-0/describing-responses/

     

    Please make sure you have defined proper Schema keyword to describe Response Body for your operation. As an fixed solution, I agree with your solution, you could replace the reference with the actual properties from Resource definition.

     

    In addition, you could also consider take a try to create your custom connector from scratch based on your REST API, then you could get rid of this OpenAPI definition structure issue.

     

    Best regards,

  • ffcloud-bskies Profile Picture
    7 on at

    Hi @v-xida-msft ,

     

    the definition I'm using is not describing a custom API I created. It is describing the Microsoft Azure API for working with Azure Lab Services and is being maintained by Microsoft. That of course doesn't mean, that it must be fitting the specification, but

    as Azure APIs are quite extensive, creating the connector from scratch would be very time consuming and also a bit unreliable compared to just taking the published definition (that has probably been generated from the actual API) and using it here. I would also like to avoid doing bigger changes to make it fit to PowerApps.

    I had a look at the OpenAPI spec and found, that the constellation used for referencing the Resources schema seems to be valid as per https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/ so from what I see there, there is nothing wrong with the definition I used.

     

    As mentioned above, for now I have a workaround. But it would be a very nice thing just being able to take definitions from the Microsoft Azure Repos and directly create connectors from it. That would save a lot of time. Or even better, just having a Built-In connector for all of the Azure APIs 🙂

     

    Regards

    Fabian

     

    Edit: If it turns out, that there is something wrong with the definition, I will head over to GitHub and ask for a fix. But from what I found out until now, that doesn't seem to be the case.

  • Christoph Profile Picture
    Microsoft Employee on at

    Same problem on my side with the allOf operator.

    Seems PowerApps does not support this part of the OpenApi V2 spec.

  • hjaf Profile Picture
    487 on at

    Any news on this issue? 
    Created an issue (documentation) as there is no information about lacking support in the documentation: Create a custom connector from an OpenAPI definition 


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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard