question

Hegel-1332 avatar image
0 Votes"
Hegel-1332 asked VineetKumarGupta-6574 answered

How can i use azure ad b2c in azure function?

i want to use azure ad b2c to manage authentication. i searched the internet and find the documents here: https://docs.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad?toc=/azure/azure-functions/toc.json

but i still do not know how i can use azure ad b2c in my azure functions. For example how can i get the email address of the logined user who send request to the azure function? Thank you!

azure-functionsazure-ad-authentication
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JamesHamil-MSFT avatar image
0 Votes"
JamesHamil-MSFT answered 53241375 commented

Hi @Hegel-1332 , have you looked into Application Insights? You can monitor your azure functions this way. Please let me knoe if you have any questions!

Best,
James


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for your kind reply. I read the Application Insight but I am still confused. I am using angular msal 2 in the frontend application and python runtime in azure functions. I want to get the email address of the logined user who send request to the api. Could you please provide a small piece of code to demonstrate the usage? Thank you!

0 Votes 0 ·

I want to get the user information in azure function when they send request to the api.

0 Votes 0 ·
53241375 avatar image
0 Votes"
53241375 answered

Hello Hegel,

Have you managed to use the filters in AppInsights or used query to find the user or respective information?
You can add alerts accordingly or may implement some sort of notifications using custom mode.

With Regards,
Indul

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

VineetKumarGupta-6574 avatar image
0 Votes"
VineetKumarGupta-6574 answered

For authenticating outside user from your domain you can add identity provider in your Azure Function and for while inviting guest account would recommend to create a group and add all your guest users in that group and then add that users group to azure function in Access Control
I hope this will fix the issue .

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.