0
votes

Unable to add Teams App for Bulk of users for Office group or to a Security group (groups created via Azure AD Connect)

I have used the below API in order to add Teams app (side loading teams app) to set of a user in an Office group/Security group.

Working fine with the specific user. Also please let me whether this api will work with AD group ?

Used graph explorer.

POST https://graph.microsoft.com/beta/users/{id}/teamwork/installedApps Content-type: application/json

{ "[email protected]":"https://graph.microsoft.com/beta/appCatalogs/teamsApps/12345678-9abc-def0-123456789a" }

Error:

"error": { "code": "NotFound", "message": "Unable to fetch license for user 'some GUID'.", "innerError": { "request-id": "some GUID", "date": "2020-04-28T15:00:00"

1
The API works for a specific user. You can add an team app to team using graph API. there is no specific API for office groupTrinetra-MSFT

1 Answers

0
votes

Assigning a custom app setup policy to users in a group

1.Install-Module -Name AzureAD

  1. /*Skype for Business Online, Windows PowerShell Module can be downloaded and installed */

  2. Import-Module SkypeOnlineConnector

    $userCredential = Get-Credential $sfbSession = New-CsOnlineSession -Credential $userCredential Import-PSSession $sfbSession

  3. connect-AzureAD -Credential $userCredential

  4. $group = Get-AzureADGroup -SearchString "TeamsApp"

  5. $members = Get-AzureADGroupMember -ObjectId $group.ObjectId -All $true | Where-Object {$_.ObjectType -eq "User"}

  6. $members | ForEach-Object { Grant-CsTeamsAppSetupPolicy -PolicyName "Teams App Policy Test" -Identity $_.UserPrincipalName}

Installation file for Skype for Business Online, Windows PowerShell Module https://www.microsoft.com/en-us/download/details.aspx?id=39366

Reference

https://docs.microsoft.com/en-us/microsoftteams/teams-app-setup-policies

https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-overview

https://docs.microsoft.com/en-us/office365/enterprise/powershell/connect-to-all-office-365-services-in-a-single-windows-powershell-window

https://docs.microsoft.com/en-us/skypeforbusiness/set-up-your-computer-for-windows-powershell/set-up-your-computer-for-windows-powershell

https://docs.microsoft.com/en-us/office365/enterprise/powershell/manage-skype-for-business-online-with-office-365-powershell