[英]Setting Azure AD Microsoft Graph Email API/Permission in Terraform
I am provisioning some Azure infrastructure using Terraform. Included in the setup requirement is some configuration of an Azure AD registered app and this requires the following Microsoft Graph permissions to be granted (see image below):我正在使用 Terraform 配置一些 Azure 基础设施。设置要求中包括 Azure AD 注册应用程序的一些配置,这需要授予以下 Microsoft Graph 权限(见下图):
Within my Terraform configuration, I have the below code snippet included in my resource "azuread_application"
block, within the required_resource_access
sub-block.在我的 Terraform 配置中,我的
resource "azuread_application"
块中的required_resource_access
子块中包含以下代码片段。 For the resource_access ids, I have used the values provided on this Microsoft page - https://learn.microsoft.com/en-us/graph/permissions-reference .对于 resource_access id,我使用了此 Microsoft 页面上提供的值 - https://learn.microsoft.com/en-us/graph/permissions-reference 。
My Terraform configuration is currently able to successfully add the GroupMember.Read.All permission, but somehow it fails to add the required Email permission as depicted in the screenshot below, displaying the GUID reference instead of the actual name "email".我的 Terraform 配置目前能够成功添加 GroupMember.Read.All 权限,但不知何故无法添加所需的 Email 权限,如下面的屏幕截图所示,显示 GUID 引用而不是实际名称“电子邮件”。
What I'd also like to be able to do in my Terraform configuration is the ability to Grant admin consent for both API/Permissions (depicted in the rightmost column).我还希望能够在我的 Terraform 配置中执行的操作是能够为 API/权限授予管理员同意(如最右侧的列所示)。
Any tips on how I can achieve all of the above?关于如何实现上述所有目标的任何提示?
For permission type
, Scope
corresponds to the Delegated
permission type, where Role
is the Application
type.对于权限
type
, Scope
对应于Delegated
权限类型,其中Role
是Application
类型。
The email
OpenID scope is a Delegated
permission type, so you need to change the permission type
from Role
to Scope
. email
OpenID scope 是Delegated
权限类型,因此需要将权限type
从Role
更改为Scope
。
resource_access {
id = "64a6cdd6-aab1-4aaf-94b8-3cc8405e90d0"
type = "Scope"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.