Powershell get presence of Azure user

Viewed 1075

A year ago I created a script that outputs the presence of a SkypeFB user. To do that I used the Microsoft.Lync.Model.dll with this:

$client = [Microsoft.Lync.Model.LyncClient]::GetClient()
$contact = $client.ContactManager.GetContactByUri("spiderman@marvel.com")
$availabilityId = $contact.GetContactInformation("Availability")
$activity = $contact.GetContactInformation("Activity")

Since all our employees don't use Skype anymore it's not needed anymore. They use MS Teams now. Is there any way I can output the exact same information? What I tried:

Install-Module AzureAD
Connect-AzureAD -Credential $credential
Get-AzureADUser -ObjectId "spiderman@marvel.com"

This works (I get information about the Azure AD user), but I couldn't find any status, availability/activity or presence. Does anyone know? If you need any further information, just ask.

1 Answers

We plan to expose presence via Microsoft Graph APIs, hopefully by the end of the year, but we don’t have any more specific plans to share at this time.

It’s a very popular request though. In the meantime there’s unfortunately no way to get or set user presence in Teams.

Related