Archive Files to Microsoft SharePoint
Yeastar P-Series PBX System supports archiving the system's call recordings and backup files to Microsoft SharePoint, either on a regular interval or at any time you want. This topic describes how to add Microsoft SharePoint as an archive server and schedule tasks to archive the desired files.
Requirements
| Item | Requirement |
|---|---|
| PBX Firmware | Version 37.21.0.66 or later |
| PBX Plan | Enterprise Plan or Ultimate Plan |
Limitations
- Archive server: 10
- Archive task: 200
Introduction
- Prepare an eligible account and the required resources on Microsoft.
- Prepare a Microsoft account with Global Administrator privilege.
- On Azure portal, create a set of application API credentials (tenant ID, client ID, and client secret) to authenticate file archiving requests from PBX.
- On SharePoint site, create a folder to store archived PBX files.
- Set up archive server and task on PBX.
When it is time to execute the archive task, PBX will use the application API credentials to send file archiving requests to Microsoft SharePoint. If the requests are considered authentic, the specified files will be archived to the designated folder in Microsoft SharePoint.
Step 1. Register an application in Microsoft Entra tenant
- Log in to Microsoft Azure Portal with the Microsoft Global Administrator account.
- In the search bar, search and select Microsoft Entra
ID service to enter your organization's directory.

- Register an application.
- On the left navigation bar of organization's directory, go to Manage > App registrations, then click New
registration.

- In the Register an application page, enter a
name to help you identify the application, then click
Register.

- Note down the Application(client) ID and Directory(tenant)
ID.

- On the left navigation bar of organization's directory, go to Manage > App registrations, then click New
registration.
- Generate a client secret.
- On the left navigation bar of the Microsoft Entra application, go to Manage > Certificates & secrets > Client secrets, then click New client
secret.

- Configure the client secret, then click
Add.

- Note down the client secret's
Value.Important: Record the client secret's value before leaving the page, as the key is only shown once. Otherwise, you will have to create a new secret.

- On the left navigation bar of the Microsoft Entra application, go to Manage > Certificates & secrets > Client secrets, then click New client
secret.
Step 2. Grant permission to the Microsoft Entra application
- On the left navigation bar of the Microsoft Entra application, go to API
permissions, then click Add a permission.

- In the Select an API page, go to Microsoft APIs > Microsoft Graph.

- Add the required permission to allow the application to read and write items in
all site collections.
- Click Application permissions, search and select
Sites.ReadWrite.All permission, then click
Add permissions.

- Click Grant admin consent for... to grant the
permission to the application.

- In the pop-up dialog box, select Yes.

The Status of the permission changes to
, indicating that the API permission has been
granted to the application successfully.
- Click Application permissions, search and select
Sites.ReadWrite.All permission, then click
Add permissions.
Step 3. Create a folder in Microsoft SharePoint
- Go to the SharePoint site where you want to create a new folder, then open the SharePoint document library.
- At the top-right corner, click Create or Upload, then
select Folder from the drop-down list.

- In the Name field, enter a name to help you identify
the folder, then click Create.

The folder is created and displayed on the list.

Step 4. Add Microsoft SharePoint as archive server on PBX
- Log in to PBX web portal, go to System > Archive.
- Under the Archive Task tab, click
Archive Server.

- Set up Microsoft SharePoint as an archive server.
- Click Add.
- In the pop-up window, complete the following settings.

Setting Description Name Enter a name to help you identify the server. Server Type Select SharePoint. Application (Client) ID Enter the Application(client) ID that you have obtained from Microsoft Entra Tenant. Tenant ID Enter the Directory(tenant) ID that you have obtained from Microsoft Entra Tenant. Client Secret Enter the client secret that you have obtained from Microsoft Entra Tenant. - Click Save.
The Microsoft SharePoint is added as an archive server and displayed on the archive server list.
- Click
to close the window.
Step 5. Create a task to archive files to Microsoft SharePoint on PBX
- Under Archive Task tab, click Add.
- Create a one-time or recurring archive task.

Setting Description Name Enter a name to help you identify the task. File Type Select Recording Files or Backup Files as needed. Data Range Specify a time range of the files to be archived. Note: You can archive files for up to 31 days at a time.Sync Frequency Set how often to archive files to Microsoft SharePoint. Note: As large amounts of data will consume PBX's CPU resources, we recommend that you schedule archive tasks during off-peak hours.- Once: If you choose the option, the system will archive files immediately after you save the task.
- Daily: If you choose the option, select a time from the drop-down list. The system will archive files at this time of the day.
- Weekly: If you choose the option, choose a day of week and select a time from the drop-down list. The system will archive files at this time of the week.
-
Monthly: If you choose the option, choose a day and select a time from the drop-down list. The system will archive files on this day and time of the month.
Recording File Format Select the download format for recording files. Note:- This option is available only when both of the
following conditions are met:
- The task is scheduled to archive recording files.
- Stereo-separated recording is enabled (Path: Call Features > Recording > Support generating stereo-separated recording files).
- All recording files in the system will be downloaded and archived in the selected format.
Archive Server Select the Microsoft SharePoint server that you have added. Select Folder/Path Select folder in which you want to store archived files. Skip archived files Optional. Specify whether to skip files that have already been archived. Note: This option is available only when you schedule to archive recording files.- If enabled, the system will NOT archive files that have already been archived.
- If disabled, the system will archive files even if they have been previously archived. The file's storage location will be updated, but the previous copy will NOT be deleted from the third-party server.
Delete local files after archiving Optional. Specify whether to delete local files after archiving. Note: This option is available only when you schedule to archive recording files.- If enabled, the local files will be deleted after archiving. They can still be played and downloaded from PBX admin portal and Linkus UC clients, but are NOT longer available for playback and download on third-party server or Dynamics 365.
- If disabled, the local files are retained after archiving.
- Click Save.
Result
- Check the archive result on PBX
- On PBX web portal, go to System > Archive > Archival Logs. If the Result column of the task shows Succeeded, it indicates that the specified files have been successfully archived to Microsoft SharePoint.
-
Note: If the task is failed, the Failed to Archive File(s) event will be triggered; You can click
to retry the
task.
- Check the archive result on Microsoft SharePoint
- On Microsoft SharePoint, go to the created folder. If the specified files appear in the list, it indicates that the archive is successful.
