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

basic authentication

I am trying to generate a swagger document that will enable Flow to work with our REST/ODATA service.  The service is protected by basic authentication.  I have been using the "http + swagger" trigger type and Flow appears to accept the swagger document. I am able to configure an query and I was able to map fields for an example action.  I don't see how I am suppose to specify the credentials for the basic authentication.  I am allowed to save the Flow, but any attempt to run the flow will fail because the service just returns 401 (not authorized) as expected since no credentials have been specified.  Under the "Show advanced options" I do get an Authentication text box with the phrase: Enter JSON object of authentication parameters.  I assume this may be where I need to enter the credentials, but it is not clear how I would enter them.  

 

The swagger document has the following security definition:

 

"securityDefinitions": {
"basicAuth": {
"type": "basic",
"description": "HTTP Basic Authentication."
}
},
"security": [
{
"basicAuth": []
}
],

 

 

3 REPLIES 3
DougL
Advocate I
Advocate I

Is there a solution to this or is basic authentication not supported by this default Microsoft Flow?

 

@steveum Did you ever figure out an answer to this?

I guessed on this and got an error that directed me the right way. The format of the JSON is:

 

{
  "type": "Basic",
  "username": "MyUser",
  "password": "MyPass"
}


If you run a flow with invalid data within it, it will show you the failed flow and what the valid parameters are. I'm sure this is also documented somewhere, but I could not find it.

In my case I guessed on "username" and "password", and it yelled at me that the type was not specified and gave a few possible values for type, one of which was "Basic", which is what I needed. Updating the file and my flow ran successfully.

As I recall I discovered the same JSON and made the same guess.  That allowed me to proceed.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,146)