在 Azure DevOps 中自動更改用戶的訪問級別 (Automatically change access level on a user in Azure DevOps)


問題描述

在 Azure DevOps 中自動更改用戶的訪問級別 (Automatically change access level on a user in Azure DevOps)

有沒有辦法在特定天數後在 Azure DevOps 中設置訪問級別的自動更改?例如,設置訪問級別從“基本 + 測試計劃”自動更改的規則。到“基本” 30 天后。

最好的問候

Lillian Hjelmstad


參考解法

方法 1:

Please follow below steps to implement this requirement.

  1. Use this Reset API: User Entitlements ‑ Get User Entitlements to get a paged set of user entitlements, and then find the id of target user.
  2. Use this Rest API: User Entitlements ‑ Update User Entitlement to update target user's access level. And the following request body(Content‑Type: application/json‑patch+json) will change the access level to Basic.
[
    {
        "from":"",
        "op":2,
        "path":"/accessLevel",
        "value":{
            "accountLicenseType":2,
            "licensingSource":1
        }
    }
]
  1. To success to call this API, you should authenticate with identity as a Project Collection Administrator or an organization Owner. You could create a PAT with full access.
  2. Create a yaml pipeline to run this API and set scheduled triggers using cron syntax.

(by Lillian HjelmstadEdward Han‑MSFT)

參考文件

  1. Automatically change access level on a user in Azure DevOps (CC BY‑SA 2.5/3.0/4.0)

#azure-devops #access-levels






相關問題

Visual Studio Online Build - Visual Studio SDK 和 Modellng SDK (Visual Studio Online Build - Visual Studio SDK and Modellng SDK)

有沒有辦法將現有的“功能”分配給史詩? (Is there a way to assign existing "feature" to epic?)

在路徑 Visual Studio Team Services 中找不到 curl (curl was not found in the path Visual Studio Team Services)

遠程 TFS 2015 到 Azure Devops(私有云)遷移 (Remote TFS 2015 to Azure Devops (private cloud) Migration)

無法再推送到 myProject.visualstudio.com (Can't push to myProject.visualstudio.com anymore)

使用 Visual Studio Code 連接 AzureDevOps Git 存儲庫時出現問題 (Issue in connecting AzureDevOps Git repo using Visual Studio Code)

適用於 Azure DevOps 和本地 PC 的發布生成事件 (Post Build event that works on both Azure DevOps and Local PC)

使用 Azure Devops 進行 CI/CD 部署 (CI/CD Deployment Using Azure Devops)

取回我創建的 DevOps 組織的所有權 (Get back ownership of DevOps organization that was created by me)

在使用源代碼管理時,我如何才能對源代碼的不同部分的用戶組擁有不同的權限? (While using source control, how can I have different permissions for groups of users for different parts of the source code?)

在 Azure DevOps 中自動更改用戶的訪問級別 (Automatically change access level on a user in Azure DevOps)

Azure DevOps Powershell 獲取與構建管道相關的工作項 (Azure DevOps Powershell get work item related to build pipeline)







留言討論