Whenever I’m testing out new Office 365 plugins I like to first deploy them to myself, then to a hand full of co-workers for testing. Here are my steps to accomplish this process:
- Log into the Office 365 admin portal
- Click Admin
- Click Groups -> Groups
- Click +Add a group
- Set the Type to Security
- Name the group addin_ADDIN replacing ADDIN with the add-in name
- Click Add
- Click the new group
- Click Edit for Owners
- Click +Add owners
- Check yourself
- Click Save
- Click Close twice
- Click Edit for Members
- Click +Add members
- Check yourself and anyone else you’d like to deploy to
- Click Save
- Click Close twice
- Click Settings -> Services & add-ins
- Click +Deploy Add-In
- Click Next
- Walk through the steps to add your specific add-in
- Connect to Office 365 in PowerShell
- Get the add-in ID (replace ADDIN-NAME with the add-ins name)
$appID = Get-App -OrganizationApp | Where-Object {$_.DisplayName -eq "ADDIN-NAME"}
- Get the security group object with the members you want to deploy the add-in to
$sg = Get-MsolGroup -GroupType “Security” | Where-Object {$_.DisplayName -eq “addin_titus”}
- Get a list of members in the security group
$sgUsers = Get-MsolGroupMember -GroupObjectId $sg.ObjectId
- Assign those members the add-in
Set-App -Identity $appID.AppId -OrganizationApp -ProvidedTo SpecificUsers -UserList $sgUsers.EmailAddress -DefaultStateForUser Enabled
That’s it. All of the members of the security group should now have access to the add-in.
As you add or remove members to the security group you’ll need to re-run these commands to update the add-in. If you’d like to check the current list of users the add-in is deployed to you can run these two commands:
$appID = Get-App -OrganizationApp | Where-Object {$_.DisplayName -eq "Classification"} Get-App -OrganizationApp -Identity $appID.AppId | fl DisplayName,AppId,Enabled,DefaultStateForUser,ProvidedTo,UserList