cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
milosi
New Member

Need to be able to set query parameter to exactly 1.0

Hey, 

 

I am currently developing custom connectors in power apps to trigger Logic Apps via shared access signature (SAS). As per the documentation [see: https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-securing-a-logic-app?tabs=azure-portal] I need to define a query parameter of sv in my custom connector request to that logic app, that specifies the SAS version to use for generating the signature. All Logic Apps use the version 1.0 [as can be seen in the generated SAS-URL, which follow the schema: https://prod-171.westeurope.logic.azure.com:443/workflows/xxxxxxxxxx/triggers/manual/paths/invoke?ap...], so I need to be able to set the default value of sv to exactly 1.0 [sv=1.0].

 

The problem is, that when I set the datatype of sv to integer, or number [float, double] and update the connector, power apps will always round/convert 1.0 to 1, which in turn will lead to an failed authentication error, when testing or using the connector.

 

When i try to set the datatype to string, I get the following error message:

 

Error : paths/~1manual~1paths~1invoke/post/parameters/2/default : The 'default' value is of type 'Integer', but should match the given type 'String'.

 

I tried using "1.0", v1.0, /1.0, ?1.0 etc. In this case i will be able to save that value as a string, but the authentication will fail, so sv really needs to be exactly 1.0! 

 

My workaround is to set the datatype of sv to string and enter some random-text as the default value, and then manually change that text to 1.0 when testing the connector or using it in a flow. This works perfectly fine, so being able to set the default value to 1.0 as a string would definitely solve this problem. But of course this is neither user friendly nor the idea of using custom connectors....

 

As all logic apps use this version 1.0, I can imagine that more users will run into this problem, so any feedback/ solution would be greatly appreciated!

 

Cheers

1 ACCEPTED SOLUTION

Accepted Solutions
cchannon
Super User
Super User

You don't need a default value at all. You can just leave it blank and set the type to string.

View solution in original post

4 REPLIES 4
cchannon
Super User
Super User

You don't need a default value at all. You can just leave it blank and set the type to string.

YazanGhafir
New Member

Having the same problem here, any one got to solve it?

Not working, got 

{
    "error": {
        "code""DirectApiAuthorizationRequired",
        "message""The request must be authenticated only by Shared Access scheme."
    }
}

Your problem is not the same as the original post here.

 

Read your error code: "DirectApiAuthorizationRequired"

 

You are having an authentication problem. You are trying to hit that endpoint without auth and it requires a Shared Access Signature (SAS). You need to add the SAS to the request header in order for it to recognize your request.

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Top Solution Authors
Top Kudoed Authors
Users online (4,734)