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 / Call Web API with wind...
Power Apps
Unanswered

Call Web API with windows authentication in powerapp

(0) ShareShare
ReportReport
Posted on by 130

I have a web api with windows authentication.

 

I want to call the web api in my power app.

 

I tried custom connectors but it doesn't have any option of windows authentication.

 

Any idea how this can be done.

 

Any help would be greatly appreciated.

 

Thanks.

Categories:
I have the same question (0)
  • v-yangar-msft Profile Picture
    Microsoft Employee on at

    Hi @TheOpeningBat ,

     

    We can call Web API with Windows authentication in PowerApps.

    You find the steps as below:

    1.Open visual studio and create ASP.Net Core Web Application:

    v-yangar-msft_0-1611046519866.png

     

    2.Configure your new project and click Create

    3.Choose the API, then click the Change under the Authentication and choose Windows Authentication

    4.The home page of your web API should open in a browser. The web API should now be running locally on IIS, make a note of the URL and Port that points to your web API

    v-yangar-msft_1-1611046519869.png

     

    5.Register your custom connector from here:

    v-yangar-msft_2-1611046519873.png

     

    6.choose create from blank

    7.here you should fill out the general section, of the custom connector. The most important piece here are the base URL and the host. Make sure you set it up to use your IP and Port:

    v-yangar-msft_3-1611046519881.png

     

    8.As your web API use windows authentication, you should choose Windows authentication in security tab.

    v-yangar-msft_4-1611046519883.png

     

    9.Under the definition tab, we will go ahead and define the Get weather operation by importing a sample request and response. Then click create connector.

    v-yangar-msft_5-1611046519888.png

     

    10.Open your on-premise data gateway, if you dont know how to install it, please refer to https://docs.microsoft.com/en-us/powerapps/maker/data-platform/using-dataflows-with-on-premises-data

    v-yangar-msft_6-1611046519892.png

     

    11.Now you can create test your connect after you added a new connection, here you should use your local windows credential to authenticate.

    v-yangar-msft_7-1611046519895.png

     

    12.Finally, you can use it in your apps::

    v-yangar-msft_8-1611046519912.png

     

     

    Hope it helps!

     

    Best Regards,

    Arrow

  • TheOpeningBat Profile Picture
    130 on at

    Hello @v-yangar-msft,

    Thanks a lot for your step-by-step guide. 

    I followed the same, however while testing the connection, I am getting the below error:

     

    Received error payload from gateway service with ID : Error parsing UserName '<pi>username</pi>

     

    Any help would be greatly appreciated. Thanks.

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

    Hello @TheOpeningBat ,

     

    I am so sorry that i can't reproduce your issue.

    Based on your error message, it seems that there is problem in your local environment. please confirm that you use the right local account. 

     

    Best Regards,

    Arrow

  • Harper_Shelby Profile Picture
    6 on at

    I've seen this error when signing in to a domain account, but leaving off the domain. The user name field should be DOMAIN\User. 

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
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard