Method TryAddTeamOwnersAsync
- Namespace
- Skyline.DataMiner.DcpChatIntegrationHelper.Teams
- Assembly
- Skyline.DataMiner.DcpChatIntegrationHelper.dll
TryAddTeamOwnersAsync(string, string[], CancellationToken)
Tries to add the given emails as owner to the given team in Microsoft Teams.
Task TryAddTeamOwnersAsync(string teamId, string[] teamOwnerEmails, CancellationToken cancellationToken = default)
Parameters
teamId
stringThe id of the team where to add the owners. This id is returned when creating a team using TryCreateTeamAsync(string, string, CancellationToken) or when fetching them using TryGetTeamsAsync(CancellationToken).
teamOwnerEmails
string[]The email addresses of the owners to add to the team. Note these email addresses must be a part of the tenant, otherwise this will fail.
cancellationToken
CancellationToken
Returns
Remarks
The organizations Microsoft Teams tenant must be configured in the Admin App and the required permissions must be granted. Note that, if new features require more permissions than were granted before, you can easily refresh your configured tenant to update it's permissions in the Admin App.
Exceptions
- TeamsChatIntegrationException
If anything went wrong. Also, when one email is not found in the tenant, none of the owners will be added and this will throw.