cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Ballzer0
Level: Powered On

calling azure functions behind Oauth2 as the authenticated user

Hi, im a developer trying to evaluate if powerapp is the right path for us.

I have an azure function that requires that logged in users call it. Because it does work based on the users authenticated identity. Is it possible to use the implicit auth flow with powerapps, so that my user will actually be authenticated as himself/herself?

thanks for any imput or suggestions. Man Wink

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: calling azure functions behind Oauth2 as the authenticated user

Hi @Ballzer0 ,

It is a normal behaviour when using custom connector shared by other users within an app.

 

Actually, if you have already shared your Custom connector to your end users, when the end users run this shared app including Custom connector, it would ask the end user to provide their credential to create a connection to this Custom connector as below:14.JPG

When the end user click "Sign in", actually, the Custom connector would use current sign in user/running user (the end user)'s credential to create a connection rather than yours.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: calling azure functions behind Oauth2 as the authenticated user

Hi @Ballzer0 ,

Could you please share a bit more about your scenario?

Do you want to call the Azure Functions within PowerApps app?

 

Currently, there is no direct way to call a Azure Function within a PowerApps app. As an alternative solution, you could consider create a custom connector based on your Azure Function within your PowerApps, then use the custom connector to call your Azure function within an app.

 

More details about using Azure Functions in PowerApps via Custom connector, please check the following blog:

https://powerapps.microsoft.com/en-us/blog/using-azure-functions-in-powerapps/

 

When you share your app with your end users, the above custom connector you added within this app would also be shared to the end users automatically. When the end users run this shared app, they need to provide their credentials to create a connection to this Custom connector.

More details about sharing Custom connector resource, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/share-app-resources#custom-connectors

Note: If your Azure Function secured by OAuth2.0 (provided by Azure Active Directory), when the end users run this shared app including Custom connector, they need to provide their Office 365 account credentials to access this Custom connector.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ballzer0
Level: Powered On

Re: calling azure functions behind Oauth2 as the authenticated user

Hi, thanks for the advice.

i have managed to set up a custom connector and everything works fine while im in the workbench. But as i published the app and shared it with one of my users. When my coworker loaded the app, there was no option to change user. so he was asked for my login credentials.

 

Also when i open the connections screen, i can see that the connection is registered with my username.


Is this normal behaviour or did i just misconfigure something in the custom connector?

Community Support Team
Community Support Team

Re: calling azure functions behind Oauth2 as the authenticated user

Hi @Ballzer0 ,

It is a normal behaviour when using custom connector shared by other users within an app.

 

Actually, if you have already shared your Custom connector to your end users, when the end users run this shared app including Custom connector, it would ask the end user to provide their credential to create a connection to this Custom connector as below:14.JPG

When the end user click "Sign in", actually, the Custom connector would use current sign in user/running user (the end user)'s credential to create a connection rather than yours.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Ballzer0
Level: Powered On

Re: calling azure functions behind Oauth2 as the authenticated user

yeah, for some reason the connector did not get shared when i shared the powerapp. once i shared the custom connector with my coworker, it got resolved. thanks for the help 🙂

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,180)