POST https://graph.microsoft.com/beta/teams/fd15cad8-80f6-484f-9666-3caf695fbf32/schedule/timeCards/clockin
Content-type: application/json
{
"atAprovedLocation": true,
"notes": {
"contentType": "text",
"content": "clock in notes"
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Teams.Item.Schedule.TimeCards.ClockIn;
using Microsoft.Graph.Beta.Models;
var requestBody = new ClockInPostRequestBody
{
Notes = new ItemBody
{
ContentType = BodyType.Text,
Content = "clock in notes",
},
AdditionalData = new Dictionary<string, object>
{
{
"atAprovedLocation" , true
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Teams["{team-id}"].Schedule.TimeCards.ClockIn.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta teams schedule time-cards clock-in post --team-id {team-id} --body '{\
"atAprovedLocation": true,\
"notes": {\
"contentType": "text",\
"content": "clock in notes"\
}\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.teams.item.schedule.timecards.clockin.ClockInPostRequestBody clockInPostRequestBody = new com.microsoft.graph.beta.teams.item.schedule.timecards.clockin.ClockInPostRequestBody();
ItemBody notes = new ItemBody();
notes.setContentType(BodyType.Text);
notes.setContent("clock in notes");
clockInPostRequestBody.setNotes(notes);
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("atAprovedLocation", true);
clockInPostRequestBody.setAdditionalData(additionalData);
var result = graphClient.teams().byTeamId("{team-id}").schedule().timeCards().clockIn().post(clockInPostRequestBody);