Azure订阅: using Certificate or AAD authentication on PowerShell?

标签 azure powershell azure-devops

我目前正在使用 AAD 身份验证来部署一些代码,但我发现我的 session 在服务器上超时,这需要我重新登录。

我听说我可以使用证书对 Azure 进行身份验证,这是可行的方法还是人们使用其他方法?

最佳答案

如果您的 AAD 身份验证 session 在短时间内超时,您可以考虑 configuring token lifetimes in Azure Active Directory .

Powershell cmd 示例:

$policy = New-AzureADPolicy -Definition @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"02:00:00","MaxAgeSessionSingleFactor":"02:00:00"}}') -DisplayName "WebPolicyScenario" -IsOrganizationDefault $false -Type "TokenLifetimePolicy"

更多 sample here .

关于Azure订阅: using Certificate or AAD authentication on PowerShell?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62092284/

相关文章:

azure - 在 Azure 中找不到 VirtoCommerce 缩略图

node.js - 带有 Angular 5 应用程序的 Azure 部署选项未在持续集成中编译和构建

powershell - 如何以特定方式格式化Powershell输出?

Azure Web作业 "Could not create SSL/TLS secure channel"

c# - 如何在 Visual Studio 代码中的 C# 函数项目上手动执行 'restore'?

sql - 在 Powershell 中将文件名中的值提取到变量中

powershell - 我无法使用Powershell更改多个文件的扩展名

git - 在 Visual Studio 中更改 Git 作者信息

azure - 无法从 VSTS 连续集成将服务结构应用程序部署到 azure 远程集群

tfs - Visual Studio Team Services/TFS 2015 项目结构