Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon كيف يمكنني تعيين هويات متعددة لوظيفة Azure واحدة


كيف يمكنني تعيين هويات متعددة لوظيفة Azure واحدة


Assigning multiple identities to a single Azure Function is possible, but it must be done at the Function App level rather than individual functions. إليك كيف يمكنك أن تفعل ذلك:

1. تمكين الهوية المدارة المعتمدة من النظام: هذا واضح ومباشر ويمكن القيام به عن طريق تشغيله في إعدادات تطبيق الوظائف. يتم إنشاء الهوية بنفس اسم تطبيق الوظيفة الخاص بك ويتم حذفه عند حذف التطبيق [1] [7].

2. قم بتعيين الهويات المدارة المُجادة للمستخدم: يمكنك إنشاء هويات مُجادة متعددة من قبل المستخدم وتعيينها إلى تطبيق وظيفتك. These identities are created and managed independently of the Function App lifecycle, allowing you to manage permissions centrally for multiple resources[1][7].

لتعيين العديد من الهويات المدارة المُجادة للمستخدم لتطبيق الوظيفة:
- قم بإنشاء الهويات المدارة المعينة من قبل المستخدم في Azure.
- انتقل إلى تطبيق وظيفتك في بوابة Azure.
- انتقل إلى علامة التبويب "الهوية".
- انقر على "تعيين المستخدم" ثم حدد الهويات التي تريد تعيينها.
- You can assign multiple User-Assigned Managed Identities to a single Function App, but you will need to manage their usage through code or configurations[1][8].

If you need different permissions for individual functions within the same Function App, consider separating them into different Function Apps, each with its own set of managed identities[2].

الاستشهادات:
[1] https://www.red-gate.com/simple-talk/cloud/azure/azure-function-and-user-assigned-managed-identities/
[2] https://stackoverflow.com/questions/67691996/can-you-assign-a-user-adaged-identity-for-iendivitual-functions-in-a-function-ap
[3] https://techcommunity.microsoft.com/t5/apps-on-azure/how-to-assign-multiple-user-danced-andentities-to-azure-web-app/m-p/3752631
[4] https://github.com/microsoftdocs/azure-docs/blob/main/articles/azure-functions/functions-istity-connections-tutorial.md
[5]
[6] https://docs.azure.cn/en-us/entra/identity/managed-identities-azure-resources/managed-identities-faq
[7]
[8] https://docs.azure.cn/en-us/app-service/overview-managed-identity?context=%2Factive-directory%2Fmanaged-identities-azure-resources%2Fcontext%2Fmsi-context&tabs=portal%2Chttp