简体   繁体   English

使用 Azure Powershell(AZ 模块)为 Dynamics CRM Online 设置 Azure Ad Api 权限

[英]Setting Azure Ad Api permission for Dynamics CRM Online using Azure Powershell (AZ Module)

I have successfully created Azure Powershell using AZ module to register app with Azure AD using app registration.我已经使用 AZ 模块成功创建了 Azure Powershell,以使用应用注册向 Azure AD 注册应用。 Now as a next step I need to add Dynamics CRM Online API permission to this registered app and grant admin consent to it.现在作为下一步,我需要向这个注册的应用程序添加 Dynamics CRM Online API 权限并授予管理员同意。 Please help how we can do it using AZ module, there are lot of help using old AZURE/AZURERM module but not much help available for AZ.请帮助我们如何使用 AZ 模块来做到这一点,使用旧的 AZURE/AZURERM 模块有很多帮助,但对 AZ 没有太多帮助。

Click here to check Image单击此处查看图像

If you want to configure API permissions fro Azure AD application with PowerShell, I suggest you use AzureAD module.如果你想使用 PowerShell 配置 Azure AD 应用程序的 API 权限,我建议你使用AzureAD模块。 The module is used to manage Azure AD resource该模块用于管理 Azure AD 资源

for example例如

Install-Module AzureAD
Import-Module AzureAD

 Connect-AzureAD

 $requiredAccess = New-Object Microsoft.Open.AzureAD.Model.RequiredResourceAccess
 $requiredAccess.ResourceAppId ="00000007-0000-0000-c000-000000000000"
 $requiredAccess.ResourceAccess = New-Object System.Collections.Generic.List[Microsoft.Open.AzureAD.Model.ResourceAccess]
 $resourceAccess = New-Object Microsoft.Open.AzureAD.Model.ResourceAccess
 $resourceAccess.Type="Scope"
 $resourceAccess.Id="78ce3f0f-a1ce-49c2-8cde-64b5c0896db4"
 $requiredAccess.ResourceAccess.Add($resourceAccess)

 Set-AzureADApplication -ObjectId "<object id>" -RequiredResourceAccess $requiredAccess

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 powershell Az 模块授予 Azure AD 应用程序访问所需权限的权限 - How to give Azure AD application access to required permissions using powershell Az module macOS 上的 Azure Az PowerShell 模块 - Azure Az PowerShell module on macOS 401-使用REST API动态CRM与Azure AD进行未经授权的身份验证 - 401- Unauthorized authentication using REST API Dynamics CRM with Azure AD 401- 使用 REST API Dynamics CRM 和来自 Spring Boot 应用程序的 Azure AD 的未经授权的身份验证 - 401- Unauthorized authentication using REST API Dynamics CRM with Azure AD from a Spring Boot app 通过 Az 模块创建 azure 应用程序并使用 powershell 分配 API 权限 - Create azure application through Az module and assign API permissions using powershell 如何使用 Az PowerShell 模块获取 Azure webapp config appsettings - How to get Azure webapp config appsettings using Az PowerShell module 无法在 linux 上安装 Azure Az PowerShell 模块 - Cannot install the Azure Az PowerShell module on linux 在 Azure AD Powershell 中自动删除组中的成员(应用 API 权限) - Removing Members in Groups in Azure AD Powershell Automatically (App API Permission) 使用Owin针对Azure AD对用户进行身份验证后,我如何以此用户的身份静默访问CRM Online Web API? - After authenticating a user against Azure AD using Owin how can I silently access CRM Online Web API as this user? 在 Terraform 中设置 Azure AD Microsoft Graph Email API/权限 - Setting Azure AD Microsoft Graph Email API/Permission in Terraform
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM