问题描述 编写Powershell Function,登录到China Azure并获取Azure AD User信息,但是发现遇见了 [Error] ERROR: ManagedIdentityCredential authentication failed: An unexpected error occured while fetching the AAD Token. Please contact support with this provided Correlation IdStat…
Azure Automation :The Azure Automation service provides a highly reliable and scalable workflow execution engine to automate frequently repeated management tasks. The processes are automated through runbooks, which are Windows PowerShell Workflows ru…
问题描述 想通过Java SDK的方式来获取Azure 门户中所列举的用户.一直报错无法正常调用接口,错误信息与AAD登录认证相关,提示tenant not found. 想要实现的目的,通过代码方式获取如下User List(https://portal.azure.cn/#blade/Microsoft_AAD_IAM/UsersManagementMenuBlade/MsGraphUsers) JAVA 代码 错误截图 如何来解决获取AAD认证的问题呢? 解决方法 在代码中,已经设置了AA…
问题描述 通过Azure Logic App(逻辑应用)实现无代码的处理JSON数据.但是如何获取Request Body中的一个属性值呢? 例如:如何来获取以下JSON结构中的 ObjectName 值? Request对象中所含的Body内容(黄色高亮部分): { "headers": { "Connection": "close", "Accept": "*/*", "Accept-Enco…
问题描述 在使用Python SDK时候,登录到China Azure (Mooncake)并访问AlertsManagement资源时候,时常遇见  EnvironmentCredential: Authentication failed 的错误消息. Python 代码: from azure.identity import DefaultAzureCredential from azure.mgmt.alertsmanagement import AlertsManagementClien…
问题描述 在参考文档"使用 GitHub Actions 部署 ARM 模板"一文中,由于是在中国区Azure上操作,所以生产的部署凭证为中国区凭证.当创建工作流时,在登录到Azure这一步骤中,模板中使用指令为" - uses: azure/login@v1"在执行时,遇见了登录到global的错误. 错误消息为:Error: Az CLI Login failed. 问题解决 从错误消息就可以发现,这是因为默认情况下,Github Action中设定的指令&qu…
问题描述 使用Azure密钥保管库(Key Vault)来托管存储账号(Storage Account)密钥的示例中,从Github中下载的示例代码在中国区Azure运行时候会遇见各种认证和授权问题,以下列举出运行代码中遇见的各种异常: "AADSTS90002: Tenant 'xxxxxxxx-66d7-xxxx-8f9f-xxxxxxxxxxxx' not found. This may happen if there are no active subscriptions for the…
在参考Azure官方文档进行VM创建时,发现其中没有包含如何设置NSG的内容,以及如何在创建时就添加数据磁盘的代码(设置磁盘为SSD类型).本文的内容以"使用 Java 创建和管理 Azure 中的 Windows VM"为基础,在其中添加如何设置NSG(网络安全组 Network Security Group), 添加数据磁盘并设置类型. 首先,创建虚拟机需要准备的资源有: 创建资源组 ResourceGroup 创建可用性集 AvailabilitySet 创建公共 IP 地址 P…
当需要通过代码的方式执行PowerShell脚本时,可以参考以下的示例. Azure SDK中提供了两个方法来执行PowerShell脚本 (SDK Source Code: https://github.com/Azure/azure-libraries-for-java/blob/master/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachin…
问题描述 在先前的一篇博文中,介绍了如何使用Microsoft Graph API来创建Azure AD用户(博文参考:[Azure Developer]使用Microsoft Graph API 如何批量创建用户,用户属性中需要包含自定义字段(如:Store_code,Store_name等),但是在调用创建AAD用户之前,因为请求的Header中必须包含Authorization:Bearer {token}值. 在中国区获取Graph API的Authorization可以参考调用专用的A…