Method TryAddTeamMembersAsync
- Namespace
- Skyline.DataMiner.DcpChatIntegrationHelper.Teams
- Assembly
- Skyline.DataMiner.DcpChatIntegrationHelper.dll
TryAddTeamMembersAsync(string, string[], CancellationToken)
Tries to add the given emails as member to the given team in Microsoft Teams.
Task TryAddTeamMembersAsync(string teamId, string[] teamMemberEmails, CancellationToken cancellationToken = default)
Parameters
teamId
stringThe id of the team where to add the members. This id is returned when creating a team using TryCreateTeamAsync(string, string, CancellationToken) or when fetching them using TryGetTeamsAsync(CancellationToken).
teamMemberEmails
string[]The email addresses of the members to add to the team. Note these email addresses must be a part of the tenant, otherwise this will fail.
cancellationToken
CancellationTokenOptional.
Returns
Remarks
The organizations Microsoft Teams tenant can be configured in the Admin App.
Exceptions
- TeamsChatIntegrationException
If anything went wrong. Also, when one email is not found in the tenant, none of the members will be added and this will throw.