root.SX

Personal blog of a sysadmin

Archives

  • April 2025
  • May 2024
  • June 2023
  • April 2016
  • August 2015
  • February 2015
  • December 2014
  • September 2014
  • March 2014
  • October 2013
  • May 2013
  • February 2013
  • January 2013

Meta

  • Log in

Month: June 2023

Skype Meeting for shared mailbox in Outlook

2023-06-13 by root·0 Comments
Mailboxes

If you are reading this, you probably have the same issue as I had.

In my Microsoft Outlook I can go to my calendar and create a New Skype Meeting (via the Skype for Business COM Add-in button) and all the Skype information add themselves to my appointment.

Unfortunately that’s not working for my team’ shared mailbox calendar. Here is the error I get:
You cannot schedule the Skype Meeting because you are not UC enabled or there may be configuration issues with your account. Make sure you are signed in to the same account you use for Microsoft Outlook. If the problem continues, please contact your support team.

First thing I did was to google it… not really useful this time (that’s why I’m writing this article, hoping it will help someone).

After some investigation my team and I reduce the scope of possible culprit to something going on in the registry of the current user. And then we found this registry path:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Lync\AddinPreference\X500ToSmtpMap

Again I turn to Google for help and not a single result about this X500ToSmtpMap thingy!

I looked at existing parameters and was able to understand from where the value were coming from. Spoiler alert: they all come from the Active Directory. Some from the current user account and some from the shared mailbox user account.
Here is the structure where user represent my AD user and sharedmailbox represent my shared mailbox AD user.
Key Name
sharedmailbox.LegacyExchangeDN + 1 underscore + sharedmailbox.mail (replace the dots by underscores in the email address)
Key Value
user.mail + semicolon + user.msRTCSIP-PrimaryUserAddress

I manually added a new REG_SZ (that’s a String Value…) that follow that logic. Here is an example :

Key Type = REG_SZ (String Value)
Key Name = "/o=MyOrg/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=<SomeHash>-Support Team_support@root_sx"
Key Value = "support@root.sx;support@sip.root.sx"

Then try to create a New Skype Meeting in the shared mailbox calendar (no need to restart Outlook). Problem solved!

To make it easier to generate this registry value I scripted a PowerShell script that will create a .reg file that you just have to apply on your computer.

<#
.SYNOPSIS
    Makes the New Skype Meeting button to work in Microsoft Outlook 2016 or newer calendar.

.DESCRIPTION
    This script generate a .reg file containing the mapping settings in order to make Skype Meeting working in Outlook.
	You must have the Skype for Business Add-in installed for Outlook.
	It works for Shared Mailbox that are added as Account (not in the Advanced tab > Mailboxes > Open these additional mailboxes.)

.PARAMETER UsernameEmail
    The AD User Email Address. Not case sensitive.

.PARAMETER SharedMailboxEmail
    The AD Shared Mailbox User Email Address. Not case sensitive.

.EXAMPLE
    The example below will generate a .reg file to add to you registry and will make the New Skype Meeting button works for a Shared Mailbox.
    PS C:\> .\SkypeMeetingForSharedMailbox.ps1 -UsernameEmail user1@root.sx -SharedMailboxEmail support@root.sx

.EXAMPLE
    The example below will generate a .reg file to add to you registry and will make the New Skype Meeting button works for the User's Mailbox.
    PS C:\> .\SkypeMeetingForSharedMailbox.ps1 -UsernameEmail user1@root.sx -SharedMailboxEmail user1@root.sx

.NOTES
    Author: root.sx
    Last Edit: 2023-06-09

#>

Param(
    [Parameter(Mandatory=$true)]
    [string]
    $UsernameEmail,
    [Parameter(Mandatory=$true)]
    [string]
    $SharedMailboxEmail
)

Import-Module ActiveDirectory

$UsernameAD = Get-ADUser -Filter {Emailaddress -eq $UsernameEmail} -Properties mail,msRTCSIP-PrimaryUserAddress
$SharedMailboxAD = Get-ADUser -Filter {Emailaddress -eq $SharedMailboxEmail} -Properties mail,legacyExchangeDN

if ( ([bool]$SharedMailboxAD) -And ([bool]$UsernameAD) )
{
	"Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Lync\AddinPreference\X500ToSmtpMap]" > SkypeMeetingForSharedMailbox.reg
	$UsernameAD | % { '"'+$SharedMailboxAD.legacyExchangeDN+'_'+($SharedMailboxAD.mail).replace(".","_")+'"="'+$_.mail+';'+($_.'msRTCSIP-PrimaryUserAddress' -Split ':')[1]+'"' } >> SkypeMeetingForSharedMailbox.reg
	Write-Host -ForegroundColor green "SUCCESS: Registry file generated : $(Get-Location)\SkypeMeetingForSharedMailbox.reg"
} else
{
	Write-Error "ERROR: Username or Shared Mailbox email address not found"
	Exit 1
}
Proudly powered by WordPress. Theme: Flat 1.7.11 by Themeisle.
Nous utilisons des cookies pour vous garantir la meilleure expérience sur notre site. Si vous continuez à utiliser ce dernier, nous considérerons que vous acceptez l'utilisation des cookies.