azure - 使用 Get-AzureADApplication 获取 AAD 应用信息时出错
问题描述
我正在尝试使用“Get-AzureADApplication”命令获取 AAD 应用程序信息。但得到以下错误 -
Get-AzureADApplication : You must call the Connect-AzureAD cmdlet before calling
any other cmdlets.
At C:\Users\v-pasahu\Desktop\Sample.ps1:18 char:11
+ if($app = Get-AzureADApplication -Filter "DisplayName eq '$($AppName) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-AzureADApplication], AadNee
dAuthenticationException
+ FullyQualifiedErrorId : Microsoft.Open.Azure.AD.CommonLibrary.AadNeedAuthe
nticationException,Microsoft.Open.AzureAD16.PowerShell.GetApplication
解决方案
根据报错信息,需要先运行命令Connect-AzureAD
。
此外,如果您没有安装 azure powershell 模块,则应在使用 azure ad powershell 之前安装它。
推荐阅读
- anylogic - Anylogic - 记录资源池活动
- java - 带有 KeyStore 和 ServerSockets 的 Java SSL/TLS
- python - 使用最新文件中缺少的项目创建一个 csv
- java - 读取文件内容抛出找不到符号
- javascript - 将 div 转换为 click、mouseover 和 mouseout 函数
- c# - 通过 .Net Framework C# 向 Gmail 发送电子邮件
- reactjs - 在对象类型错误中反应打字稿useState字符串
- python - AWS Chalice+API Gateway 中如何支持常见的 RESTful HTTP 响应码?
- fork - 分叉到 libVLC 时的非常奇怪的行为
- javascript - 模拟复选框上的“shift”按键以选择多行