Azure Function 使用 Managed Identity,Powershell 执行时如何解决 ERROR: 错误?
- 内容介绍
- 文章标签
- 相关推荐
本文共计1772个文字,预计阅读时间需要8分钟。
问题描述:编写Powershell函数,登录到China Azure并获取Azure AD用户信息,但遇到错误:[Error] ERROR: ManagedIdentityCredential authentication failed: An unexpected error occurred while fetching the AAD Token. Please...
编写Powershell Function:powershellfunction Get-AzureADUserInfo { # 尝试使用系统管理的身份验证获取Azure AD Token try { $token=[Microsoft.Azure.Authentication.Authentication]::GetTokenAsync(https://graph.chinacloudapi.cn/.default, Application, $null, $null).Result } catch { Write-Error 登录失败,请检查网络连接或身份验证配置。
本文共计1772个文字,预计阅读时间需要8分钟。
问题描述:编写Powershell函数,登录到China Azure并获取Azure AD用户信息,但遇到错误:[Error] ERROR: ManagedIdentityCredential authentication failed: An unexpected error occurred while fetching the AAD Token. Please...
编写Powershell Function:powershellfunction Get-AzureADUserInfo { # 尝试使用系统管理的身份验证获取Azure AD Token try { $token=[Microsoft.Azure.Authentication.Authentication]::GetTokenAsync(https://graph.chinacloudapi.cn/.default, Application, $null, $null).Result } catch { Write-Error 登录失败,请检查网络连接或身份验证配置。

