APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new Microsoft.Graph.Beta.Models.IndustryData.YearTimePeriodDefinition
{
DisplayName = "Fiscal Year 2022",
EndDate = new Date(DateTime.Parse("2023-06-15")),
StartDate = new Date(DateTime.Parse("2022-09-01")),
Year = new Microsoft.Graph.Beta.Models.IndustryData.YearReferenceValue
{
Code = "2022",
},
};
var result = await graphClient.External.IndustryData.Years.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta external industry-data years create --body '{\
"displayName": "Fiscal Year 2022",\
"endDate": "2023-06-15",\
"startDate": "2022-09-01",\
"year": {\
"code": "2022"\
}\
}\
'
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
YearTimePeriodDefinition yearTimePeriodDefinition = new YearTimePeriodDefinition();
yearTimePeriodDefinition.displayName = "Fiscal Year 2022";
yearTimePeriodDefinition.endDate = new DateOnly(1900,1,1);
yearTimePeriodDefinition.startDate = new DateOnly(1900,1,1);
YearReferenceValue year = new YearReferenceValue();
year.code = "2022";
yearTimePeriodDefinition.year = year;
graphClient.external().industryData().years()
.buildRequest()
.post(yearTimePeriodDefinition);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new YearTimePeriodDefinition();
$requestBody->setDisplayName('Fiscal Year 2022');
$requestBody->setEndDate(new Date('2023-06-15'));
$requestBody->setStartDate(new Date('2022-09-01'));
$year = new YearReferenceValue();
$year->setCode('2022');
$requestBody->setYear($year);
$result = $graphServiceClient->external()->industryData()->years()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
request_body = YearTimePeriodDefinition(
display_name = "Fiscal Year 2022",
end_date = "2023-06-15",
start_date = "2022-09-01",
year = YearReferenceValue(
code = "2022",
),
)
result = await graph_client.external.industry_data.years.post(body = request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.