This guide outlines a specific use case for leveraging the ConnecttoTeams API to configure and deploy the ConnecttoTeams Unified App. While the ConnecttoTeams service is also available in other Teams applications tailored to individual services, those apps are outside the scope of this document.
Part I: Add CallApp Add-on to Enterprise
Enable CallApp for Enterprise
If Enterprise is not yet created, create the Enterprise:
Follow the guide in Creating and Registering an Enterprise with Restricted Access, but be sure to pass the value [
PBX","CALLAPP"]to theservicesinstead.Proceed to follow the rest of the Creating and Registering an Enterprise with Restricted Access guides to complete the PBX configuration.
If Enterprise is already existing with PBX enabled, add the CallApp Add-on to the Enterprise
Edit the enterprise to add the
CALLAPPto theservicesattribute.See the API call details here: Common API Methods > Edit Enterprise.
Get CallApp Consent
Follow the steps in Enterprise Admin URL Workflow by using values
action_type=“GET_CALL_APP_CONSENT”and corresponding Consent Type from the Supported Action Types table.Sync the Unified App
Follow the instruction here: Common API Methods > Sync Unified App.
Part II: Configure CallApp Users
Configure CallApp Users
API Endpoint
Method:
POSTPath:
/valet/configureValetUserRequest Body (JSON)
{ "pbxCallPolicyInfo": { "callPolicyCNAM": "TRANSPARENT", "callPolicyName": "Global", "forwardedCallsCallerId": "USER_CALLER_ID" }, "authenticationResult": { "authenticationResult": { "accessToken": "eyJ0eXAiOiJKV1QiLCJub25jZSI6IjdKbXh..............", "accessTokenType": "login.microsoftonline.com", "expiresOn": 1743285790991831, "idToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1..............", "multipleResourceRefreshToken": false, "userInfo": { "displayableId": "globaladmin@example.com", "identityProvider": "user", "tenantId": "<tenantid>" } } }, "userType": "Service", "directRouteId": -1, "useTeamsVoicemail": false, "password": "<password>", "rePassword": "<password>", "pbxAuthUserId": "104", "pbxLocation": "<pbx location>", "pbxUserId": "104", "phoneNumber": "14139301634", "portalLoginName": "", "portalPassword": "", "teamsUserId": "user1@example.com", "useEnterpriseDialPlan": true, "tenantID": "<tenant-id>", "loginID": "<ent-admin-id@example.com>", "sipAutoProvisioningEnabled": false, "useAudioConferenceVRP": false, "userTag": "" }Required Fields
directRouteIdpasswordpbxAuthUserIdpbxUserIdphoneNumberpbxLocationteamUserIdauthenticationResultAPI Response
On success, the API returns
200 OKSync Teams Users
Any changes in the users as mentioned in the above step is applied only to ConnecttoTeams databases and the PBX instance. The change need to be pushed to Microsoft as well so that the Teams User will actually be able to receive and make calls thru the PBX.
See the API call details here: Common API Methods > Sync Teams Users.