Restricting the scheduling add-in to specific users

This section explains how to use Windows PowerShell to enable the scheduling add-in for all users from a specific group. Note that:

  • These instructions extract a list of users in a particular group, and then make the add-in available to each of those users. If the members of a group change, you will need to use the Set-App command to make the add-in available to the updated list of users.
  • Using Windows PowerShell to enable the scheduling add-in for specific users is limited to a maximum size of 1000 users. This means the commands below will only work if the AD group contains 1000 users or fewer. This is a limitation which Microsoft will address with the new "Centralized Deployment" feature available to Office 365 users (see https://docs.microsoft.com/en-us/office/dev/add-ins/publish/centralized-deployment). However, this feature is currently in preview for Outlook Add-ins and is expected to be made available by Microsoft in the near future.

Prerequisites

Before you start you must have completed the following steps:

  1. Configuring Exchange/Office 365 for scheduling
  2. Configuring a Pexip Exchange Integration
  3. Downloading the add-in XML file

Exchange 2013 on-prem

If you have an Exchange 2013 on-premises deployment, you can enable the scheduling add-in for users from either a specific Active Directory (AD) group or a specific Exchange distribution group. For full information on the add-in PowerShell commands for Exchange 2013 used in these examples, see the following Microsoft documentation:

Active Directory (AD) group

To restrict the add-in to all members of an AD group (for example, a distribution group or a security group) that has been created on your AD server:

  1. Get all the users in the group, and then get each user’s UPN:

    $users = Get-AdGroupMember -Identity "<Group Name>" | % { Get-AdUser $_.SamAccountName | select UserPrincipalName }
  2. Put each UPN in an array:

    $user_list = @()
    for ($i=0; $i -lt $users.length; $i++) {
        $user_list += $users[$i].UserPrincipalName
    }
  3. Read the scheduling add-in manifest from file:

    $Data=Get-Content -Path "<Scheduling Manifest File Path>" -Encoding Byte -ReadCount 0
  4. Execute the New-App command:

    New-App -OrganizationApp -FileData $Data -ProvidedTo SpecificUsers -UserList $user_list -DefaultStateForUser Enabled

Exchange distribution group

To restrict the add-in to all members of a specific Exchange distribution group:

  1. Get all the users in the distribution group:

    $user_list = Get-DistributionGroupMember "<Group Name>"
  2. Read the scheduling add-in manifest from file:

    $Data=Get-Content -Path "<Scheduling Manifest File Path>" -Encoding Byte -ReadCount 0
  3. Execute the New-App command:

    New-App -OrganizationApp -FileData $Data -ProvidedTo SpecificUsers -UserList $user_list -DefaultStateForUser Enabled

Office 365 with Azure AD

For full information on the add-in PowerShell commands for Office 365 used in these examples, see the following Microsoft documentation:

Azure AD group

To restrict the add-in to all members of an Azure AD group:

  1. Set up a PowerShell session with access to both Azure and Exchange. To do this, follow the instructions at https://technet.microsoft.com/en-gb/library/dn568015.aspx.
  2. Get a list of your Groups and their corresponding IDs:

    Get-MsolGroup | Format-Table -Auto ObjectID,DisplayName

    Example output:

    ObjectId                             DisplayName
    --------                             -----------
    977e8519-c71e-4670-bc7b-2aef408189da Pexip List
    145f2550-82ef-419d-830b-ca018a21cea4 Pexip Group
  3. Get the users from the targeted group:

    $users = Get-MsolGroupMember -GroupObjectID "<ObjectID>"
  4. Get each user's email address and put in an array:

    $user_list = @()
    for ($i=0; $i -lt $users.length; $i++) {
        $user_list += $users[$i].EmailAddress
    }
  5. Read the scheduling add-in manifest from file:

    $Data=Get-Content -Path "<Scheduling Manifest File Path>" -Encoding Byte -ReadCount 0
  6. Execute the New-App command:

    New-App -OrganizationApp -FileData $Data -ProvidedTo SpecificUsers -UserList $user_list -DefaultStateForUser Enabled

Verifying the add-in is available as expected

After you have enabled the add-in for a group, you should confirm it is provided to the users you expect. To do this:

  1. Get the App ID of the add-in you want to check:

    Get-App -OrganizationApp | Format-Table -Auto DisplayName,AppId

    Example output:

    DisplayName              AppId
    -----------              -----
    Pexip Scheduling Service 79623c8b-9daf-42a0-b051-b130b8c3aef4
    Bing Maps                7a774f0c-7a6f-11e0-85ad-07fb4824019b
    My Templates             a216ceed-7791-4635-a752-5a4ac0a5eb93
    Suggested Meetings       bc13b9d0-5ba2-446a-956b-c583bdc94d5e
    Unsubscribe              d39dee0e-fdc3-4015-af8d-94d4d49294b3
    Action Items             f60b8ac7-c3e3-4e42-8dad-e4e1fea59ff7
    
  2. Execute the Get-App command:

    Get-app -OrganizationApp -Identity "<AppId>" | Format-List DisplayName,AppId,Enabled,Default*,ProvidedTo,UserList

    Example output:

    DisplayName         : Pexip Scheduling Service
    AppId               : 79623c8b-9daf-42a0-b051-b130b8c3aef4
    Enabled             : True
    DefaultStateForUser : Enabled
    ProvidedTo          : SpecificUsers
    UserList            : {rd.pexip.com/Users/Administrator, rd.pexip.com/Users/Toby Finch, rd.pexip.com/Users/Ben Hockley, rd.pexip.com/Users/Bob Test, rd.pexip.com/Users/Alice Test}

Changing the users for an existing add-in

You can edit the set of users to which an existing add-in is available. You may wish to do this if, for example, users have been added or removed from the group, or the add-in was added using EAC and you now wish to restrict it to a particular set of users.

  1. Get the App ID of the add-in:

    Get-App -OrganizationApp | Format-Table -Auto DisplayName,AppId

    Example output:

    DisplayName              AppId
    -----------              -----
    Pexip Scheduling Service 79623c8b-9daf-42a0-b051-b130b8c3aef4
    Bing Maps                7a774f0c-7a6f-11e0-85ad-07fb4824019b
    My Templates             a216ceed-7791-4635-a752-5a4ac0a5eb93
    Suggested Meetings       bc13b9d0-5ba2-446a-956b-c583bdc94d5e
    Unsubscribe              d39dee0e-fdc3-4015-af8d-94d4d49294b3
    Action Items             f60b8ac7-c3e3-4e42-8dad-e4e1fea59ff7
  2. Get a list of users using the method appropriate for your version of Exchange:

  3. Execute the Set-App command:

    Set-App -OrganizationApp -Identity "<AppId>" -ProvidedTo SpecificUsers -UserList $user_list

    For example:

    Set-App -OrganizationApp -Identity "79623c8b-9daf-42a0-b051-b130b8c3aef4" -ProvidedTo SpecificUsers -UserList $user_list