Microsoft Graph Presence Publisher (Set) Configuration
Note
Introduced in DC2023.04 as back-end service for (re)setting Teams Presence associated with a Reason-Code (see: Change Presence / Reason Code )
Extended use in DC2024.01 as back-end service for (re)setting Teams Presence during and after Wrap-Up (discharge) time ends. (see: Wrap-up Time)
For feature presence behavior comparisons and considerations see tables below Presence Behavior for AnywhereNow features.
Introduction
The Microsoft Graph Cloud Communications Presence APIs are used by AnywhereNow for two distinct Presence actions, Get Presence states of agents and Set Presence state of agents:

-
See other article: Microsoft Graph Presence Source which enables the UCC A Unified Contact Center, or UCC, is a queue of interactions (voice, email, IM, etc.) that are handled by Agents. Each UCC has its own settings, IVR menus and Agents. Agents can belong to one or several UCCs and can have multiple skills (competencies). A UCC can be visualized as a contact center “micro service”. Customers can utilize one UCC (e.g. a global helpdesk), a few UCC’s (e.g. for each department or regional office) or hundreds of UCC’s (e.g. for each bed at a hospital). They are interconnected and can all be managed from one central location. to continuously get (collect) presence of Teams users, and
-
This Article: Microsoft Graph Presence Publisher enables the UCC to set presence of Teams users, on-demand by the AnywhereNow components.
For more information on current capabilities of Graph API, see Microsoft’s documentation on https://learn.microsoft.com/en-us/graph/api/resources/presence?view=graph-rest-1.0
Important
While it is technically possible to create one "super" App to control all AnywhereNowGraph API calls to Microsoft 365, we recommend registering the Microsoft Graph Presence Publisher (set) and the Microsoft Presence Source (get) as two separate apps in your Microsoft Entra ID Formerly known as Azure Active Directory (or Azure AD, or AAD).
-
Firstly, either the Presence Publisher app or the Presence Source app , could generate a higher load/volume in the Microsoft Graph API than expected, which could lead to throttling Throttling, in the context of a software cloud delivery service, is the practice of temporarily suspending or diminishing access to a service offering to a cloud customer. Because cloud platforms are mostly multi-tenant, shared platforms and the usage at any moment of many customers is unpredictable, throttling is a normal and logical procedure of retaining a cloud service for all customers, sometimes at the expense of one or a handful of customers who are at that time using too many resources for the backend platform. Not only a customer itself, but also a "noisy neighbour" on the same platform can be the cause of throttling. Usually service will be resumed at a normal level after a short cool-down period, but can even take up to 24 hours or more. In Microsoft 365 throttling is usually indicated by "429 errors" or "server too busy" messages in logfiles or replies. or other issues.
-
Secondly, Publishing other users' Presence with the Publisher app may not be desired or legally permitted in your company, region or country, making this an optional feature.
High Level Steps
In order to start setting or changing presence of other Microsoft Teams user accounts. There are two prerequisites, per tenant.
-
A Microsoft Entra ID Formerly known as Azure Active Directory (or Azure AD, or AAD) App registration is needed to access the Microsoft Graph APIs.
-
A ClientSecret is needed to authenticate the App Registration.
-
Enable Presence Publisher for AnywhereNow
1. Microsoft Entra Id App Registration Steps
Follow the below steps to setup an App Registration in the Microsoft Entra ID portal.
- Navigate to: https://entra.microsoft.com/
-
Under Applications -> App registrations create a new App registration
-
Provide a Name for the application, for example: AnywhereNow Graph Set Presence Application
-
Select the account type “Accounts in this organizational directory only”
-
Click “Register”
-
-
On the API permissions tab, add the following Microsoft Graph - Application permission:
Presence.ReadWrite.All - Read presence information of all users in your organization
Description: Allows the app to read all presence information and write activity and availability of all users in the directory without a signed-in user. Presence information includes activity, availability, status note, calendar out-of-office message, time zone and location.
Why is this required? To allow the Graph Presence Publisher to set the presence of an Agent, for example when setting a Reason Code.
Permission name: Microsoft Graph / Presence.ReadWrite.All
User.Read.All - Read all users' full profiles
Description: Allows the app to read user profiles without a signed in user.
Why is this required? To allow the Graph Presence Publisher App to translate UPN In Windows Active Directory, a User Principal Name (UPN) is the name of a system user in an email address 'like' format. A UPN (for example: john.doe@domain.com) consists of the user name (logon name), separator (the @ symbol), and domain name (UPN suffix). to ID, the ID is required to retrieve presence from user.
Permission name: Microsoft Graph / User.Read.All
-
Since the Presence.ReadWrite.All and User.Read.All permissions needs Admin consent, click the button “Grant admin consent for <tenant>”.
Note
Only a tenant administrator can grant the admin consent
-
On the Authentication tab, change “Allow public client flows” to “Yes”.
-
Click “Save”
-
-
On the Overview tab, copy both the Application (client) ID and the Directory (tenant) ID
-
These IDs can then be shared with your AnywhereNow contact to enter in OnePortal Formerly known as Partner Portal. A redesigned web portal for managing Dialogue Cloud deployments..
-
2. Client secret (renewal)
This app is authenticated with a ClientId and ClientSecret to the Graph API. The ClientSecret needs to be created separately (and periodically renewed) in the Entra ID App registration.
- Navigate to the Application you created in 1. Microsoft Entra Id App Registration Steps
-
On the Client secret tab, click on New client secret:
-
Enter a Description and set the Expires value
-
On the next screen, copy the Value of this secret (so not the Secret ID)
-
The Value can then be shared with your AnywhereNow contact to enter in OnePortal.
-
The Value needs to be used for 3. Configure the Presence Publisher.
-
Note
A new ClientSecret can be entered in OnePortal in advance, however to activate a renewed ClientSecret , a UCC service restart is required. We advice to plan this well ahead so a the restart can be scheduled for a service window suitable to you.
3. Configure the Presence Publisher
Note
Introduced in DC2023.04.
In OnePortal enable the Graph Presence Publisher by filling in the below details en switching the enable/disable toggle:
-
Tenant Id
-
Client ID
-
ClientSecret
Presence Behavior for AnywhereNow features.
The Presence Publisher is will have an effect on the call distribution experienced by your agents. Also, various AnywhereNow features will gradually be adapted or (re-)added to make use of the Presence Publisher service. For now these are:
-
Reason Codes (as of bundle DC2023.04)
-
Wrap-Up functionality (as of bundle DC2024.01)
Note
Beware that Teams Presence is stored in the customers tenant (not in AnywhereNow) and is also influenced by other actors like the Microsoft 365 (Outlook) calendar, machine state (locked p.c.), activity (idle = away after xx minutes), signed in on other devices (Teams on mobile) and possible other 3rd party apps (Busylight?).
We call this Native Teams Presence.
Behavior comparison tables
With Presence Publisher Enabled

Feature Action | Before DC2023.04 |
As of DC2023.04 |
As of DC2024.01 |
---|---|---|---|
Select Reason Code with status busy |
|
|
|
Select Reason Code with status away |
|
|
|
Select Reason Code - No reason code |
|
|
|
Wrap-Up - in progress |
|
|
|
Wrap-Up - ends (timer or manual) |
|
|
|
* assuming LowestHuntPresence = available, and assuming Native Teams Presence state = available

Feature Action | Before DC2023.04 |
As of DC2023.04 |
As of DC2024.01 |
---|---|---|---|
Select Reason Code with status busy |
|
|
|
Select Reason Code with status away |
|
|
|
Select Reason Code - No reason code |
|
|
|
Wrap-Up - in progress |
|
|
|
Wrap-Up - ends (timer or manual) |
|
|
|
* assuming LowestHuntPresence = available, and assuming Native Teams Presence state = busy
With Presence Publisher Disabled

Feature Action | Before DC2023.04 |
As of DC2023.04 |
As of DC2024.01 |
---|---|---|---|
Select Reason Code with status busy |
|
|
|
Select Reason Code with status away |
|
|
|
Select Reason Code - No reason code |
|
|
|
Wrap-Up - in progress |
|
|
|
Wrap-Up - ends (timer or manual) |
|
|
|
* assuming LowestHuntPresence = available, and assuming Native Teams Presence state = available

Feature Action | Before DC2023.04 |
As of DC2023.04 |
As of DC2024.01 |
---|---|---|---|
Select Reason Code with status busy |
|
|
|
Select Reason Code with status away |
|
|
|
Select Reason Code - No reason code |
|
|
|
Wrap-Up - in progress |
|
|
|
Wrap-Up - ends (timer or manual) |
|
|
|
* assuming LowestHuntPresence = available, and assuming Native Teams Presence state = busy