寻找一种自动方法来提前识别服务主体列表的到期日期,并在到期日期在跨度的 60 天内通知相关团队。我在 azuredevops 管道中尝试了以下 bash 命令,但它没有提供任何输出。
az ad sp credential list --id "xxxxxxxxxxxxxxxxxxx" --query "[].endDate" -o tsv
我在 azuredevops 管道中尝试了以下 bash 命令,但它没有提供任何输出。
az ad sp credential list --id "xxxxxxxxxxxxxxxxxxx" --query "[].endDate" -o tsv
由于 Azure Active Directory (Azure AD) Graph 的停用,
Azure CLI Version 2.37.0
将合并 Microsoft Graph API
以替换底层 Active Directory Graph API
az ad app credential list
命令已更新,而不是az ad sp credential list
,请参阅schaffererin
的Ms Doc了解更多详细信息。
要显示 Azure 服务主体到期日期,您可以使用以下命令。
旧命令:
az ad sp credential list --id 48bb608e-4779-465a-xvxvxvxvxvxvxvxvxve7d62fbc23 --query "[].endDate" -o tsv
更新命令:
az ad app credential list --id 48bb608e-hfhfhfh-465a-fhfhfh-2fe7d62fbc23 --query '[].endDateTime' --output tsv
输出: