To securely call an Azure Function from an Angular app deployed in either Azure App Service or Azure Storage Account (Static Web

To securely call an Azure Function from an Angular app deployed in either Azure App Service or Azure St

To securely call an Azure Function from an Angular app deployed in either Azure App Service or Azure Storage Account (Static Website Hosting), Please recommend an approach

Use Azure Active Directory (AAD) Authentication. integrate Azure API Management for additional control. Use MSAL.js in Angular to acquire and pass access tokens securely.

To securely call an Azure Function from an Angular app deployed in either Azure App Service or Azure Storage Account (Static Website Hosting), Please recommend an approach

Use Azure Active Directory (AAD) Authentication. integrate Azure API Management for additional control. Use MSAL.js in Angular to acquire and pass access tokens securely.

Share Improve this question asked Nov 19, 2024 at 3:08 ChiruCharanChiruCharan 11 bronze badge 1
  • Provide code what you have tried. – Aslesha Kantamsetti Commented Nov 19, 2024 at 3:33
Add a comment  | 

1 Answer 1

Reset to default 0

Check below steps to call an Azure Function with Angular app deployed in an Azure App Service.

  • You need to create two app registrations one for API and other for Webapp.

In API app registration you need to add a scope.

In your angular app registration, add API permission that you've created earlier.

Thanks to @Pshul for clear explanation, I've referred this doc for the code.

After deploying your angular app to Azure web app, make sure you add the web app URL to app registration.

Make sure you enable CORS in your Function app

  • To add Azure Function app as an API Go to APIM -> APIs -> Add API -> Azure Function App.

Please refer this MSdoc for better understanding about adding an Azure Function App as an API in Azure API Management.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745584546a4634452.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信