-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathpermissions_report.rs
More file actions
32 lines (26 loc) · 927 Bytes
/
permissions_report.rs
File metadata and controls
32 lines (26 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// permissions_report.rs
// Permissions report example
use anyhow::Result;
use azure_devops_rust_api::permissions_report;
use std::env;
mod utils;
#[tokio::main]
async fn main() -> Result<()> {
// Get authentication credential
let credential = utils::get_credential()?;
// Get ADO server configuration via environment variables
let organization = env::var("ADO_ORGANIZATION").expect("Must define ADO_ORGANIZATION");
// Create permissions_report client
let permissions_report_client = permissions_report::ClientBuilder::new(credential).build();
// Get Permissions reports
println!("Permissions reports:");
let permissions_reports = permissions_report_client
.permissions_report_client()
.list(&organization)
.await?
.value;
println!("{permissions_reports:#?}");
Ok(())
}