This post describes how to create a custom connector (API connector) to call the Azure APIM from PowerApps and Flows. This process is especially helpful to know when you would like to use the Azure APIM from a PowerApp and/or Flow and there is no connector available for the Azure APIM we wish to use.
Before creating custom connector in powerapps, the first step is registering your Azure APIM application in the Microsoft Azure Portal and keep the following security details handy in notepad
- Client ID
- Client secret
- Tenant ID
- Resource url
Let’s start step by step…
1. The first step is to export Swagger File(OpenApi 2.0) from Azure APIM of the API you wish to connect from PowerApps/Power Automate.
Create custom connector
2. In a web browser, open the PowerApps web app in Office 365
3. Click Data, then click Custom Connectors
4. Click the + New custom connector link
5. Select Import an OpenApi file
6. Select the JSON file you exported in the first step
7. Enter the custom connector name
8. Click Continue
9. Change icon, color and description if required under General Tab
10. Verify Scheme, Host and Base URL
11. Click Security tab
12. In the Choose what authentication is implemented by your API dropdown list, select OAuth 2.0
13. In the OAuth 2.0 section, in the Identity Provider dropdown list, select Azure Active Directory
14. In the Client id text box, enter the Client Id you saved to Notepad
15. In the Client Secret text box, enter the Client secret you saved to Notepad
16. In the Scope text box, enter the permissions you configured when you made the application (Directory.Read.All, Group.Read.All)
17. In the Resource URL text box, enter Client ID fot Backend App Registration i.e. https://global.consent.azure-apim.net/redirect
18. Click Definition
19. Change the Operation Id to a valid name format. In this case, we use SearchPerson
20. Set if any http header needs to be passed with request
21. Click Create connector
22. Click the Test tab
23. Click New connection
24. Click Create
25. Sign in to your Office 365 account
26. Test Search Person operation
Custom connector is added to your data sources now.
Using Custom connector inside App
Let’s use the newly created Custom connector now
1. Create a new canvas app
2. Goto Connectors under Data sources and click on newly added Custom Connector
After adding the new Datasource a new item would be visible under In your App section.
3. Now add one Text Input and one Button control and one Gallery on the screen
4. Select the button’s OnSelect function and write the code shown in the screen below
In the code below we are calling the newly added Custom Connector’s Search Person Operation and the result is being stored inside a Collection. This collection it the datasource for the gallery on this screen.
5. Run the app and enter some text inside text input.
All matching records would be displayed in the gallery with Name, Image and status.
The Power Automate platform gives users an unprecedented way of automating business processes without the need to have coding knowledge. The platform gives the user the ability to create powerful workflows and connect to external systems like never before.
In this blog, I explained to you how you can formulate your custom connector for Power Apps through a series of steps. If you have any confusion, questions or insights, leave a comment below!
60 thoughts on “PowerApps: Create Custom Connector to call Azure APIM API from PowerApps or Power Automate”
I enjoyed reading what you had to say. You are obviously very knowledgeable. Good job on this article! Your article has proven useful to me. Juditha Kenon Bradlee
I am glad that it helped you in some way.
You have observed very interesting details! ps decent web site. Melisenda Tannie Kizzie
Hope you find it useful.
There is definately a great deal to find out about this subject. I love all the points you have made. Gertruda Allen Stavro
Thanks, hope it helped you.
This is my first time visit at here and i am in fact happy to read all at alone place. Jewelle Filippo Chard
Thank you 🙂
I know this if off topic but I’m looking into starting
my own weblog and was curious what all is required to get setup?
I’m assuming having a blog like yours would cost a pretty penny?
I’m not very web savvy so I’m not 100% positive.
Any tips or advice would be greatly appreciated. Many thanks
Thanks for visiting.
To start your own website you need to do following things:
1. Buy a domain & website hosting it would cost you around USD10-15 per year
2. Use WordPress to make your log, it’s free.
i like this super article
This piece of writing is in fact a pleasant one it helps new internet visitors, who are wishing in favor of blogging. Naomi Homere Mariandi
This is my first time pay a quick visit at here and i am really pleassant to read all at alone place. Miranda Brian Rorry
I pay a quick visit every day some blogs and websites to read content, but this website gives feature based writing. Jessamine Dionisio Renae
Thank you for the kind words:)
Appreciation to my father who told me concerning this weblog, this blog is genuinely remarkable. Inga Baxy Bruckner
Glad it helped you, thank you:)
Not much to add, other than thank you for expressing this so eloquently, and I agree with every point you raise. Lindy Paquito Bette-Ann
Really appreciate your kind words:)
I will recommend your beautiful post site to my friends
Thank you, hope it helped you as well.
I really like the design and contents of your web page
I think it is a fluent sharing, I will recommend your site to my friends
I am incessantly thought about this, thanks for posting.
I think it is a fluent sharing, I will recommend your site to my friends
I reckon something truly special in this website.
Thanks again for the article. Really Cool.
Thanks for visiting, hope it helped you 🙂
Very good article! We will be linking to this great content on our site.
Keep up the great writing.
Thanks for visiting 🙂
Howdy! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very
good success. If you know of any please share. Kudos!
Thanks for visiting.
You can try Yoast SEO for any WP website.
Oh my goodness! Impressive article dude! Thank you, However I am having problems with your RSS.
I don’t know the reason why I can’t join it. Is there anybody
getting similar RSS issues? Anyone that knows the solution can you kindly respond?
thanks for visiting
try the url for feeds
Spot on with this write-up, I absolutely believe this site needs a lot
more attention. I’ll probably be back again to read through more, thanks for the advice!
Thank for the lovely feedback 🙂
Excellent post. I’m facing a few of these issues as
well.. asmr 0mniartist
Greate pieces. Keep writing such kind of info on your blog.
Im really impressed by your blog.
Hello there, You have performed a great job.
I will certainly digg it and individually suggest to my friends.
I’m confident they will be benefited from this website.
What’s up colleagues, its enormous article concerning cultureand entirely defined,
keep it up all the time. asmr 0mniartist
Heya i am for the first time here. I came across this board and I find
It really useful & it helped me out much. I hope to give something back and help
others like you helped me. 0mniartist asmr
Wow, that’s what I was exploring for, what a data!
present here at this weblog, thanks admin of this web page.
I am not sure where you’re getting your info, but great
topic. I needs to spend some time learning much more or understanding more.
Thanks for wonderful info I was looking for this information for my mission.
Now I am going to do my breakfast, afterward having my breakfast coming again to read further news.
Thanks for some other fantastic article. The place else may anyone get that type of
information in such a perfect method of writing? I have a presentation subsequent week, and I’m on the look for such info.
If you want to get much from this paragraph then you have to apply such techniques to your won webpage.
Hey very interesting blog!
My brother suggested I might like this web site. He was totally
right. This post actually made my day. You cann’t imagine simply how much time I had spent for this information! Thanks!
Terrific post however , I was wanting to know if you could write a litte more on this subject?
I’d be very grateful if you could elaborate a little bit further.
It’s awesome to go to see this web page and reading the views
of all mates on the topic of this paragraph, while I am also keen of getting
Hello there! I just wish to give you a big thumbs up for
the excellent information you’ve got here on this post.
I’ll be coming back to your website for more soon.
Wow, amazing blog layout! How long have you been blogging for?
you made blogging look easy. The overall look of your site is excellent, let
alone the content!
terrific and remarkable blog. I really intend to
thanks, for providing us far better information.
It’s hard to come by experienced people in this particular topic, however, you sound like you know what you’re talking about!
Greetings! Very helpful advice in this particular article!
It’s the little changes which will make the greatest changes.
Thanks a lot for sharing!
Hi there i am kavin, its my first occasion to commenting anyplace, when i read
this article i thought i could also make comment due to this brilliant paragraph.