GET https://graph.microsoft.com/beta/reports/getTeamsTeamCounts(period='D7')?$format=text/csv
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Reports.GetTeamsTeamCountsWithPeriod("{period}").GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Format = "text/csv";
});
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphreports "github.com/microsoftgraph/msgraph-beta-sdk-go/reports"
//other-imports
)
requestFormat := "text/csv"
requestParameters := &graphreports.ReportsGetTeamsTeamCountsWithPeriodRequestBuilderGetQueryParameters{
Format: &requestFormat,
}
configuration := &graphreports.ReportsGetTeamsTeamCountsWithPeriodRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
period := "{period}"
graphClient.Reports().GetTeamsTeamCountsWithPeriod(&period).Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
graphClient.reports().getTeamsTeamCountsWithPeriod("{period}").get(requestConfiguration -> {
requestConfiguration.queryParameters.format = "text/csv";
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.reports.get_teams_team_counts(period='{period}').get_teams_team_counts_with_period_request_builder import GetTeamsTeamCountsWithPeriodRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = GetTeamsTeamCountsWithPeriodRequestBuilder.GetTeamsTeamCountsWithPeriodRequestBuilderGetQueryParameters(
format = "text/csv",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
await graph_client.reports.get_teams_team_counts_with_period("{period}").get(request_configuration = request_configuration)
HTTP/1.1 302 Found
Content-Type: text/plain
Location: https://reports.office.com/data/download/JDFKdf2_eJXKS034dbc7e0t__XDe
遵循 302 重定向,下载的 CSV 文件具有以下架构。
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Report Refresh Date,Report Date,Public Teams,Active Public Teams,Private Teams,Active Private Teams