Enable Office 365 Add-ins for Specific Users

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:

  1. Log into the Office 365 admin portal
  2. Click Admin
  3. Click Groups -> Groups
  4. Click +Add a group
  5. Set the Type to Security
  6. Name the group addin_ADDIN replacing ADDIN with the add-in name
  7. Click Add
  8. Click the new group
  9. Click Edit for Owners
  10. Click +Add owners
  11. Check yourself
  12. Click Save
  13. Click Close twice
  14. Click Edit for Members
  15. Click +Add members
  16. Check yourself and anyone else you’d like to deploy to
  17. Click Save
  18. Click Close twice
  19. Click Settings -> Services & add-ins
  20. Click +Deploy Add-In
  21. Click Next
  22. Walk through the steps to add your specific add-in
  23. Connect to Office 365 in PowerShell
  24. Get the add-in ID (replace ADDIN-NAME with the add-ins name)
    • $appID = Get-App -OrganizationApp | Where-Object {$_.DisplayName -eq "ADDIN-NAME"}
  25. 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”}
  26. Get a list of members in the security group
    • $sgUsers = Get-MsolGroupMember -GroupObjectId $sg.ObjectId
  27. 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:

1
2
$appID = Get-App -OrganizationApp | Where-Object {$_.DisplayName -eq "Classification"}
Get-App -OrganizationApp -Identity $appID.AppId | fl DisplayName,AppId,Enabled,DefaultStateForUser,ProvidedTo,UserList

 

Leave a Reply

Your email address will not be published. Required fields are marked *