Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie im Artikel zum Thema Berechtigungen.
Nachfolgend sehen Sie ein Beispiel der Anforderung.
POST https://graph.microsoft.com/beta/bookingBusinesses/{id}/staffMembers
Content-type: application/json
{
"@odata.type":"#microsoft.graph.bookingStaffMember",
"colorIndex":1,
"displayName":"Dana Swope",
"emailAddress":"danas@contoso.com",
"role@odata.type":"#microsoft.graph.bookingStaffRole",
"role":"externalGuest",
"timeZone":"America/Chicago",
"useBusinessHours":true,
"workingHours@odata.type":"#Collection(microsoft.graph.bookingWorkHours)",
"workingHours":[
{
"@odata.type":"#microsoft.graph.bookingWorkHours",
"day@odata.type":"#microsoft.graph.dayOfWeek",
"day":"monday",
"timeSlots@odata.type":"#Collection(microsoft.graph.bookingWorkTimeSlot)",
"timeSlots":[
{
"@odata.type":"#microsoft.graph.bookingWorkTimeSlot",
"end":"17:00:00.0000000",
"start":"08:00:00.0000000"
}
]
},
{
"@odata.type":"#microsoft.graph.bookingWorkHours",
"day@odata.type":"#microsoft.graph.dayOfWeek",
"day":"tuesday",
"timeSlots@odata.type":"#Collection(microsoft.graph.bookingWorkTimeSlot)",
"timeSlots":[
{
"@odata.type":"#microsoft.graph.bookingWorkTimeSlot",
"end":"17:00:00.0000000",
"start":"08:00:00.0000000"
}
]
},
{
"@odata.type":"#microsoft.graph.bookingWorkHours",
"day@odata.type":"#microsoft.graph.dayOfWeek",
"day":"wednesday",
"timeSlots@odata.type":"#Collection(microsoft.graph.bookingWorkTimeSlot)",
"timeSlots":[
{
"@odata.type":"#microsoft.graph.bookingWorkTimeSlot",
"end":"17:00:00.0000000",
"start":"08:00:00.0000000"
}
]
},
{
"@odata.type":"#microsoft.graph.bookingWorkHours",
"day@odata.type":"#microsoft.graph.dayOfWeek",
"day":"thursday",
"timeSlots@odata.type":"#Collection(microsoft.graph.bookingWorkTimeSlot)",
"timeSlots":[
{
"@odata.type":"#microsoft.graph.bookingWorkTimeSlot",
"end":"17:00:00.0000000",
"start":"08:00:00.0000000"
}
]
},
{
"@odata.type":"#microsoft.graph.bookingWorkHours",
"day@odata.type":"#microsoft.graph.dayOfWeek",
"day":"friday",
"timeSlots@odata.type":"#Collection(microsoft.graph.bookingWorkTimeSlot)",
"timeSlots":[
{
"@odata.type":"#microsoft.graph.bookingWorkTimeSlot",
"end":"17:00:00.0000000",
"start":"08:00:00.0000000"
}
]
}
],
"isEmailNotificationEnabled": false
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var bookingStaffMember = new BookingStaffMember
{
ColorIndex = 1,
DisplayName = "Dana Swope",
EmailAddress = "danas@contoso.com",
Role = BookingStaffRole.ExternalGuest,
TimeZone = "America/Chicago",
UseBusinessHours = true,
WorkingHours = new List<BookingWorkHours>()
{
new BookingWorkHours
{
Day = DayOfWeek.Monday,
TimeSlots = new List<BookingWorkTimeSlot>()
{
new BookingWorkTimeSlot
{
End = new TimeOfDay(17, 0, 0),
Start = new TimeOfDay(8, 0, 0)
}
},
AdditionalData = new Dictionary<string, object>()
{
{"day@odata.type", "#microsoft.graph.dayOfWeek"},
{"timeSlots@odata.type", "#Collection(microsoft.graph.bookingWorkTimeSlot)"}
}
},
new BookingWorkHours
{
Day = DayOfWeek.Tuesday,
TimeSlots = new List<BookingWorkTimeSlot>()
{
new BookingWorkTimeSlot
{
End = new TimeOfDay(17, 0, 0),
Start = new TimeOfDay(8, 0, 0)
}
},
AdditionalData = new Dictionary<string, object>()
{
{"day@odata.type", "#microsoft.graph.dayOfWeek"},
{"timeSlots@odata.type", "#Collection(microsoft.graph.bookingWorkTimeSlot)"}
}
},
new BookingWorkHours
{
Day = DayOfWeek.Wednesday,
TimeSlots = new List<BookingWorkTimeSlot>()
{
new BookingWorkTimeSlot
{
End = new TimeOfDay(17, 0, 0),
Start = new TimeOfDay(8, 0, 0)
}
},
AdditionalData = new Dictionary<string, object>()
{
{"day@odata.type", "#microsoft.graph.dayOfWeek"},
{"timeSlots@odata.type", "#Collection(microsoft.graph.bookingWorkTimeSlot)"}
}
},
new BookingWorkHours
{
Day = DayOfWeek.Thursday,
TimeSlots = new List<BookingWorkTimeSlot>()
{
new BookingWorkTimeSlot
{
End = new TimeOfDay(17, 0, 0),
Start = new TimeOfDay(8, 0, 0)
}
},
AdditionalData = new Dictionary<string, object>()
{
{"day@odata.type", "#microsoft.graph.dayOfWeek"},
{"timeSlots@odata.type", "#Collection(microsoft.graph.bookingWorkTimeSlot)"}
}
},
new BookingWorkHours
{
Day = DayOfWeek.Friday,
TimeSlots = new List<BookingWorkTimeSlot>()
{
new BookingWorkTimeSlot
{
End = new TimeOfDay(17, 0, 0),
Start = new TimeOfDay(8, 0, 0)
}
},
AdditionalData = new Dictionary<string, object>()
{
{"day@odata.type", "#microsoft.graph.dayOfWeek"},
{"timeSlots@odata.type", "#Collection(microsoft.graph.bookingWorkTimeSlot)"}
}
}
},
IsEmailNotificationEnabled = false,
AdditionalData = new Dictionary<string, object>()
{
{"role@odata.type", "#microsoft.graph.bookingStaffRole"},
{"workingHours@odata.type", "#Collection(microsoft.graph.bookingWorkHours)"}
}
};
await graphClient.BookingBusinesses["{bookingBusiness-id}"].StaffMembers
.Request()
.AddAsync(bookingStaffMember);
const options = {
authProvider,
};
const client = Client.init(options);
const bookingStaffMember = {
'@odata.type':'#microsoft.graph.bookingStaffMember',
colorIndex: 1,
displayName: 'Dana Swope',
emailAddress: 'danas@contoso.com',
'role@odata.type':'#microsoft.graph.bookingStaffRole',
role: 'externalGuest',
timeZone: 'America/Chicago',
useBusinessHours: true,
'workingHours@odata.type':'#Collection(microsoft.graph.bookingWorkHours)',
workingHours: [
{
'@odata.type':'#microsoft.graph.bookingWorkHours',
'day@odata.type':'#microsoft.graph.dayOfWeek',
day: 'monday',
'timeSlots@odata.type':'#Collection(microsoft.graph.bookingWorkTimeSlot)',
timeSlots: [
{
'@odata.type':'#microsoft.graph.bookingWorkTimeSlot',
end: '17:00:00.0000000',
start: '08:00:00.0000000'
}
]
},
{
'@odata.type':'#microsoft.graph.bookingWorkHours',
'day@odata.type':'#microsoft.graph.dayOfWeek',
day: 'tuesday',
'timeSlots@odata.type':'#Collection(microsoft.graph.bookingWorkTimeSlot)',
timeSlots: [
{
'@odata.type':'#microsoft.graph.bookingWorkTimeSlot',
end: '17:00:00.0000000',
start: '08:00:00.0000000'
}
]
},
{
'@odata.type':'#microsoft.graph.bookingWorkHours',
'day@odata.type':'#microsoft.graph.dayOfWeek',
day: 'wednesday',
'timeSlots@odata.type':'#Collection(microsoft.graph.bookingWorkTimeSlot)',
timeSlots: [
{
'@odata.type':'#microsoft.graph.bookingWorkTimeSlot',
end: '17:00:00.0000000',
start: '08:00:00.0000000'
}
]
},
{
'@odata.type':'#microsoft.graph.bookingWorkHours',
'day@odata.type':'#microsoft.graph.dayOfWeek',
day: 'thursday',
'timeSlots@odata.type':'#Collection(microsoft.graph.bookingWorkTimeSlot)',
timeSlots: [
{
'@odata.type':'#microsoft.graph.bookingWorkTimeSlot',
end: '17:00:00.0000000',
start: '08:00:00.0000000'
}
]
},
{
'@odata.type':'#microsoft.graph.bookingWorkHours',
'day@odata.type':'#microsoft.graph.dayOfWeek',
day: 'friday',
'timeSlots@odata.type':'#Collection(microsoft.graph.bookingWorkTimeSlot)',
timeSlots: [
{
'@odata.type':'#microsoft.graph.bookingWorkTimeSlot',
end: '17:00:00.0000000',
start: '08:00:00.0000000'
}
]
}
],
isEmailNotificationEnabled: false
};
await client.api('/bookingBusinesses/{id}/staffMembers')
.version('beta')
.post(bookingStaffMember);
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/bookingBusinesses/{id}/staffMembers"]]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphBookingStaffMember *bookingStaffMember = [[MSGraphBookingStaffMember alloc] init];
[bookingStaffMember setColorIndex: 1];
[bookingStaffMember setDisplayName:@"Dana Swope"];
[bookingStaffMember setEmailAddress:@"danas@contoso.com"];
[bookingStaffMember setRole: [MSGraphBookingStaffRole externalGuest]];
[bookingStaffMember setTimeZone:@"America/Chicago"];
[bookingStaffMember setUseBusinessHours: true];
NSMutableArray *workingHoursList = [[NSMutableArray alloc] init];
MSGraphBookingWorkHours *workingHours = [[MSGraphBookingWorkHours alloc] init];
[workingHours setDay: [MSGraphDayOfWeek monday]];
NSMutableArray *timeSlotsList = [[NSMutableArray alloc] init];
MSGraphBookingWorkTimeSlot *timeSlots = [[MSGraphBookingWorkTimeSlot alloc] init];
[timeSlots setEnd:@"17:00:00.0000000"];
[timeSlots setStart:@"08:00:00.0000000"];
[timeSlotsList addObject: timeSlots];
[workingHours setTimeSlots:timeSlotsList];
[workingHoursList addObject: workingHours];
MSGraphBookingWorkHours *workingHours = [[MSGraphBookingWorkHours alloc] init];
[workingHours setDay: [MSGraphDayOfWeek tuesday]];
NSMutableArray *timeSlotsList = [[NSMutableArray alloc] init];
MSGraphBookingWorkTimeSlot *timeSlots = [[MSGraphBookingWorkTimeSlot alloc] init];
[timeSlots setEnd:@"17:00:00.0000000"];
[timeSlots setStart:@"08:00:00.0000000"];
[timeSlotsList addObject: timeSlots];
[workingHours setTimeSlots:timeSlotsList];
[workingHoursList addObject: workingHours];
MSGraphBookingWorkHours *workingHours = [[MSGraphBookingWorkHours alloc] init];
[workingHours setDay: [MSGraphDayOfWeek wednesday]];
NSMutableArray *timeSlotsList = [[NSMutableArray alloc] init];
MSGraphBookingWorkTimeSlot *timeSlots = [[MSGraphBookingWorkTimeSlot alloc] init];
[timeSlots setEnd:@"17:00:00.0000000"];
[timeSlots setStart:@"08:00:00.0000000"];
[timeSlotsList addObject: timeSlots];
[workingHours setTimeSlots:timeSlotsList];
[workingHoursList addObject: workingHours];
MSGraphBookingWorkHours *workingHours = [[MSGraphBookingWorkHours alloc] init];
[workingHours setDay: [MSGraphDayOfWeek thursday]];
NSMutableArray *timeSlotsList = [[NSMutableArray alloc] init];
MSGraphBookingWorkTimeSlot *timeSlots = [[MSGraphBookingWorkTimeSlot alloc] init];
[timeSlots setEnd:@"17:00:00.0000000"];
[timeSlots setStart:@"08:00:00.0000000"];
[timeSlotsList addObject: timeSlots];
[workingHours setTimeSlots:timeSlotsList];
[workingHoursList addObject: workingHours];
MSGraphBookingWorkHours *workingHours = [[MSGraphBookingWorkHours alloc] init];
[workingHours setDay: [MSGraphDayOfWeek friday]];
NSMutableArray *timeSlotsList = [[NSMutableArray alloc] init];
MSGraphBookingWorkTimeSlot *timeSlots = [[MSGraphBookingWorkTimeSlot alloc] init];
[timeSlots setEnd:@"17:00:00.0000000"];
[timeSlots setStart:@"08:00:00.0000000"];
[timeSlotsList addObject: timeSlots];
[workingHours setTimeSlots:timeSlotsList];
[workingHoursList addObject: workingHours];
[bookingStaffMember setWorkingHours:workingHoursList];
NSError *error;
NSData *bookingStaffMemberData = [bookingStaffMember getSerializedDataWithError:&error];
[urlRequest setHTTPBody:bookingStaffMemberData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
BookingStaffMember bookingStaffMember = new BookingStaffMember();
bookingStaffMember.colorIndex = 1;
bookingStaffMember.displayName = "Dana Swope";
bookingStaffMember.emailAddress = "danas@contoso.com";
bookingStaffMember.additionalDataManager().put("role@odata.type", new JsonPrimitive("#microsoft.graph.bookingStaffRole"));
bookingStaffMember.role = BookingStaffRole.EXTERNAL_GUEST;
bookingStaffMember.timeZone = "America/Chicago";
bookingStaffMember.useBusinessHours = true;
bookingStaffMember.additionalDataManager().put("workingHours@odata.type", new JsonPrimitive("#Collection(microsoft.graph.bookingWorkHours)"));
LinkedList<BookingWorkHours> workingHoursList = new LinkedList<BookingWorkHours>();
BookingWorkHours workingHours = new BookingWorkHours();
workingHours.additionalDataManager().put("day@odata.type", new JsonPrimitive("#microsoft.graph.dayOfWeek"));
workingHours.day = DayOfWeek.MONDAY;
workingHours.additionalDataManager().put("timeSlots@odata.type", new JsonPrimitive("#Collection(microsoft.graph.bookingWorkTimeSlot)"));
LinkedList<BookingWorkTimeSlot> timeSlotsList = new LinkedList<BookingWorkTimeSlot>();
BookingWorkTimeSlot timeSlots = new BookingWorkTimeSlot();
timeSlots.end = new TimeOfDay(0, 0, 0);
timeSlots.start = new TimeOfDay(0, 0, 0);
timeSlotsList.add(timeSlots);
workingHours.timeSlots = timeSlotsList;
workingHoursList.add(workingHours);
BookingWorkHours workingHours1 = new BookingWorkHours();
workingHours1.additionalDataManager().put("day@odata.type", new JsonPrimitive("#microsoft.graph.dayOfWeek"));
workingHours1.day = DayOfWeek.TUESDAY;
workingHours1.additionalDataManager().put("timeSlots@odata.type", new JsonPrimitive("#Collection(microsoft.graph.bookingWorkTimeSlot)"));
LinkedList<BookingWorkTimeSlot> timeSlotsList1 = new LinkedList<BookingWorkTimeSlot>();
BookingWorkTimeSlot timeSlots1 = new BookingWorkTimeSlot();
timeSlots1.end = new TimeOfDay(0, 0, 0);
timeSlots1.start = new TimeOfDay(0, 0, 0);
timeSlotsList1.add(timeSlots1);
workingHours1.timeSlots = timeSlotsList1;
workingHoursList.add(workingHours1);
BookingWorkHours workingHours2 = new BookingWorkHours();
workingHours2.additionalDataManager().put("day@odata.type", new JsonPrimitive("#microsoft.graph.dayOfWeek"));
workingHours2.day = DayOfWeek.WEDNESDAY;
workingHours2.additionalDataManager().put("timeSlots@odata.type", new JsonPrimitive("#Collection(microsoft.graph.bookingWorkTimeSlot)"));
LinkedList<BookingWorkTimeSlot> timeSlotsList2 = new LinkedList<BookingWorkTimeSlot>();
BookingWorkTimeSlot timeSlots2 = new BookingWorkTimeSlot();
timeSlots2.end = new TimeOfDay(0, 0, 0);
timeSlots2.start = new TimeOfDay(0, 0, 0);
timeSlotsList2.add(timeSlots2);
workingHours2.timeSlots = timeSlotsList2;
workingHoursList.add(workingHours2);
BookingWorkHours workingHours3 = new BookingWorkHours();
workingHours3.additionalDataManager().put("day@odata.type", new JsonPrimitive("#microsoft.graph.dayOfWeek"));
workingHours3.day = DayOfWeek.THURSDAY;
workingHours3.additionalDataManager().put("timeSlots@odata.type", new JsonPrimitive("#Collection(microsoft.graph.bookingWorkTimeSlot)"));
LinkedList<BookingWorkTimeSlot> timeSlotsList3 = new LinkedList<BookingWorkTimeSlot>();
BookingWorkTimeSlot timeSlots3 = new BookingWorkTimeSlot();
timeSlots3.end = new TimeOfDay(0, 0, 0);
timeSlots3.start = new TimeOfDay(0, 0, 0);
timeSlotsList3.add(timeSlots3);
workingHours3.timeSlots = timeSlotsList3;
workingHoursList.add(workingHours3);
BookingWorkHours workingHours4 = new BookingWorkHours();
workingHours4.additionalDataManager().put("day@odata.type", new JsonPrimitive("#microsoft.graph.dayOfWeek"));
workingHours4.day = DayOfWeek.FRIDAY;
workingHours4.additionalDataManager().put("timeSlots@odata.type", new JsonPrimitive("#Collection(microsoft.graph.bookingWorkTimeSlot)"));
LinkedList<BookingWorkTimeSlot> timeSlotsList4 = new LinkedList<BookingWorkTimeSlot>();
BookingWorkTimeSlot timeSlots4 = new BookingWorkTimeSlot();
timeSlots4.end = new TimeOfDay(0, 0, 0);
timeSlots4.start = new TimeOfDay(0, 0, 0);
timeSlotsList4.add(timeSlots4);
workingHours4.timeSlots = timeSlotsList4;
workingHoursList.add(workingHours4);
bookingStaffMember.workingHours = workingHoursList;
bookingStaffMember.isEmailNotificationEnabled = false;
graphClient.bookingBusinesses("{id}").staffMembers()
.buildRequest()
.post(bookingStaffMember);
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewBookingStaffMember()
colorIndex := int32(1)
requestBody.SetColorIndex(&colorIndex)
displayName := "Dana Swope"
requestBody.SetDisplayName(&displayName)
emailAddress := "danas@contoso.com"
requestBody.SetEmailAddress(&emailAddress)
role := "externalGuest"
requestBody.SetRole(&role)
timeZone := "America/Chicago"
requestBody.SetTimeZone(&timeZone)
useBusinessHours := true
requestBody.SetUseBusinessHours(&useBusinessHours)
requestBody.SetWorkingHours( []BookingWorkHours {
msgraphsdk.NewBookingWorkHours(),
day := "monday"
SetDay(&day)
SetTimeSlots( []BookingWorkTimeSlot {
msgraphsdk.NewBookingWorkTimeSlot(),
end := "17:00:00.0000000"
SetEnd(&end)
start := "08:00:00.0000000"
SetStart(&start)
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.bookingWorkTimeSlot",
}
}
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.bookingWorkHours",
"day@odata.type": "#microsoft.graph.dayOfWeek",
"timeSlots@odata.type": "#Collection(microsoft.graph.bookingWorkTimeSlot)",
}
msgraphsdk.NewBookingWorkHours(),
day := "tuesday"
SetDay(&day)
SetTimeSlots( []BookingWorkTimeSlot {
msgraphsdk.NewBookingWorkTimeSlot(),
end := "17:00:00.0000000"
SetEnd(&end)
start := "08:00:00.0000000"
SetStart(&start)
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.bookingWorkTimeSlot",
}
}
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.bookingWorkHours",
"day@odata.type": "#microsoft.graph.dayOfWeek",
"timeSlots@odata.type": "#Collection(microsoft.graph.bookingWorkTimeSlot)",
}
msgraphsdk.NewBookingWorkHours(),
day := "wednesday"
SetDay(&day)
SetTimeSlots( []BookingWorkTimeSlot {
msgraphsdk.NewBookingWorkTimeSlot(),
end := "17:00:00.0000000"
SetEnd(&end)
start := "08:00:00.0000000"
SetStart(&start)
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.bookingWorkTimeSlot",
}
}
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.bookingWorkHours",
"day@odata.type": "#microsoft.graph.dayOfWeek",
"timeSlots@odata.type": "#Collection(microsoft.graph.bookingWorkTimeSlot)",
}
msgraphsdk.NewBookingWorkHours(),
day := "thursday"
SetDay(&day)
SetTimeSlots( []BookingWorkTimeSlot {
msgraphsdk.NewBookingWorkTimeSlot(),
end := "17:00:00.0000000"
SetEnd(&end)
start := "08:00:00.0000000"
SetStart(&start)
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.bookingWorkTimeSlot",
}
}
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.bookingWorkHours",
"day@odata.type": "#microsoft.graph.dayOfWeek",
"timeSlots@odata.type": "#Collection(microsoft.graph.bookingWorkTimeSlot)",
}
msgraphsdk.NewBookingWorkHours(),
day := "friday"
SetDay(&day)
SetTimeSlots( []BookingWorkTimeSlot {
msgraphsdk.NewBookingWorkTimeSlot(),
end := "17:00:00.0000000"
SetEnd(&end)
start := "08:00:00.0000000"
SetStart(&start)
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.bookingWorkTimeSlot",
}
}
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.bookingWorkHours",
"day@odata.type": "#microsoft.graph.dayOfWeek",
"timeSlots@odata.type": "#Collection(microsoft.graph.bookingWorkTimeSlot)",
}
}
isEmailNotificationEnabled := false
requestBody.SetIsEmailNotificationEnabled(&isEmailNotificationEnabled)
requestBody.SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.bookingStaffMember",
"role@odata.type": "#microsoft.graph.bookingStaffRole",
"workingHours@odata.type": "#Collection(microsoft.graph.bookingWorkHours)",
}
bookingBusinessId := "bookingBusiness-id"
result, err := graphClient.BookingBusinessesById(&bookingBusinessId).StaffMembers().Post(requestBody)
Import-Module Microsoft.Graph.Bookings
$params = @{
"@odata.type" = "#microsoft.graph.bookingStaffMember"
ColorIndex = 1
DisplayName = "Dana Swope"
EmailAddress = "danas@contoso.com"
"Role@odata.type" = "#microsoft.graph.bookingStaffRole"
Role = "externalGuest"
TimeZone = "America/Chicago"
UseBusinessHours = $true
"WorkingHours@odata.type" = "#Collection(microsoft.graph.bookingWorkHours)"
WorkingHours = @(
@{
"@odata.type" = "#microsoft.graph.bookingWorkHours"
"Day@odata.type" = "#microsoft.graph.dayOfWeek"
Day = "monday"
"TimeSlots@odata.type" = "#Collection(microsoft.graph.bookingWorkTimeSlot)"
TimeSlots = @(
@{
"@odata.type" = "#microsoft.graph.bookingWorkTimeSlot"
End = "17:00:00.0000000"
Start = "08:00:00.0000000"
}
)
}
@{
"@odata.type" = "#microsoft.graph.bookingWorkHours"
"Day@odata.type" = "#microsoft.graph.dayOfWeek"
Day = "tuesday"
"TimeSlots@odata.type" = "#Collection(microsoft.graph.bookingWorkTimeSlot)"
TimeSlots = @(
@{
"@odata.type" = "#microsoft.graph.bookingWorkTimeSlot"
End = "17:00:00.0000000"
Start = "08:00:00.0000000"
}
)
}
@{
"@odata.type" = "#microsoft.graph.bookingWorkHours"
"Day@odata.type" = "#microsoft.graph.dayOfWeek"
Day = "wednesday"
"TimeSlots@odata.type" = "#Collection(microsoft.graph.bookingWorkTimeSlot)"
TimeSlots = @(
@{
"@odata.type" = "#microsoft.graph.bookingWorkTimeSlot"
End = "17:00:00.0000000"
Start = "08:00:00.0000000"
}
)
}
@{
"@odata.type" = "#microsoft.graph.bookingWorkHours"
"Day@odata.type" = "#microsoft.graph.dayOfWeek"
Day = "thursday"
"TimeSlots@odata.type" = "#Collection(microsoft.graph.bookingWorkTimeSlot)"
TimeSlots = @(
@{
"@odata.type" = "#microsoft.graph.bookingWorkTimeSlot"
End = "17:00:00.0000000"
Start = "08:00:00.0000000"
}
)
}
@{
"@odata.type" = "#microsoft.graph.bookingWorkHours"
"Day@odata.type" = "#microsoft.graph.dayOfWeek"
Day = "friday"
"TimeSlots@odata.type" = "#Collection(microsoft.graph.bookingWorkTimeSlot)"
TimeSlots = @(
@{
"@odata.type" = "#microsoft.graph.bookingWorkTimeSlot"
End = "17:00:00.0000000"
Start = "08:00:00.0000000"
}
)
}
)
IsEmailNotificationEnabled = $false
}
New-MgBookingBusinessStaffMember -BookingBusinessId $bookingBusinessId -BodyParameter $params
Nachfolgend sehen Sie ein Beispiel der Antwort.