Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception calling "BeginPublishContactInformation" with "3" argument(s) #13

Open
tjoepies opened this issue Mar 2, 2022 · 3 comments
Open

Comments

@tjoepies
Copy link

tjoepies commented Mar 2, 2022

Hello,

I tried using the module
Publish-SfBContactInformation -CustomActivityId 5 -Availability Away -PersonalNote "Getting Coffee" -Location "@Kitchen"

unfortunately it fails with the following error:

PS C:\Users\MyUser> Publish-SfBContactInformation -CustomActivityId 4 -Availability Away -PersonalNote "Getting Coffee" -Location "The Kitchen"
MethodInvocationException: C:\Users\MyUser\Documents\PowerShell\Modules\PSProductivityTools\0.7\Functions\Publish-SfBContactInformation.ps1:132
Line |
 132 |              $Publish = $Self.BeginPublishContactInformation($ContactI …
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "BeginPublishContactInformation" with "3" argument(s): ""

MethodInvocationException: C:\Users\MyUser\Documents\PowerShell\Modules\PSProductivityTools\0.7\Functions\Publish-SfBContactInformation.ps1:134
Line |
 134 |              $Self.EndPublishContactInformation($Publish)
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "EndPublishContactInformation" with "1" argument(s): "Invalid asyncResult"

I have Office Professional 2016 32-bit on Windows 10 Pro 64-bit
I have also installed the necessary SDK: lyncsdk86.msi

Unfortunately I do not know how to fix this. Must the id exist in the CustomPreference.xml?

@tjoepies
Copy link
Author

tjoepies commented Mar 2, 2022

This works:

Publish-SfBContactInformation -CustomActivityId 4 -PersonalNote $PersonalNote -ErrorAction Stop

Location does not work:

Publish-SfBContactInformation -CustomActivityId 4 -PersonalNote $PersonalNote -ErrorAction Stop -Location "Kitchen"

Publish-SfBContactInformation : Exception calling "BeginPublishContactInformation" with "3" argument(s): ""
At line:1 char:1
+ Publish-SfBContactInformation -CustomActivityId 4 -PersonalNote $Pers ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Publish-SfBContactInformation], MethodInvocationException
    + FullyQualifiedErrorId : OperationException,Publish-SfBContactInformation

@tjoepies
Copy link
Author

tjoepies commented Mar 2, 2022

able to retrieve the information LocationName:

$([Microsoft.Lync.Model.LyncClient]::GetClient()).ContactManager.GetContactByUri("[email protected]").GetContactInformation('LocationName')
Kitchen

So perhaps the administrator disabled this functionality?

@janegilring
Copy link
Owner

Hi,

Yes, admin restriction might be the culprit.

Unfortunately, I am not using SfB anymore, so I am unable to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants