Replies: 2 comments 2 replies
-
Microsoft.PowerFx.Connectors is support to enable Power Fx to call REST services, like what Power Apps does for Connector calls. It adds an extension method to config which adds services: swagger is an OpenAPI document that describes the rest service. These rest endpoints are then imported as functions into the given namespace. Invoking the functions then invokes via the provided httpClient, which can handle authentication or any transforms between what the swagger describes and what the service actually expects. See these tests for calling an arbitrary REST service: For example, For example, calling: Will inject functions, so that this Fx expression: executes as a http call (via the provided httpClient) like this: These dll is still in preview (we may make breaking changes), but you can certainly try it and give us feedback. This can also be used to call Power Platform connectors (https://docs.microsoft.com/en-us/connectors/connector-reference/connector-reference-powerapps-connectors), just like how Power Apps does. The test above demonstrates this, however, the challenge there is getting authentication permission to invoke these connectors. There's not a good way for 3rd parties to do this yet. |
Beta Was this translation helpful? Give feedback.
-
@MikeStall - That sounds great! I will look at the tests again and see how OAuth is handled. |
Beta Was this translation helpful? Give feedback.
-
I had a look at these tests (https://github.com/microsoft/Power-Fx/blob/main/src/tests/Microsoft.PowerFx.Connectors.Tests/PowerPlatformConnectorTests.cs), but I am not able to connect the dots.
What is the intention of Microsoft.PowerFx.Connectors project?
Beta Was this translation helpful? Give feedback.
All reactions