4.22 Register Swyx applications in Azure using PowerShell scripts
You can use the PowerShell script to create or update a Microsoft Entra ID application registration for Swyx integrations. The script registers the corresponding Swyx application in Microsoft Entra ID and generates a secret client key for further configuration in the Swyx Control Center.
The script can register two Swyx applications for:
*Federated services (Single Sign-On) and the synchronization of Teams presence status, calendars, and contacts, see 4.21 Federated services via identity providers.
or
*Swyx Direct for Microsoft Teams, see 4.23 Set Up Swyx Direct for Microsoft Teams. The application for federated services in Entra ID must already be registered.
The file EntraID_PowerShell_Configuration.zip can be downloaded from this website:
https://service-de.enreach.com/hc/en-gb/articles/28465370751260-Entra-ID-App-Registration-for-Federated-Authentication-Swyx-Microsoft-Teams-Presence-Status-Synchronisation-and-Swyx-Direct-for-MS-Teams-with-PowerShell-for-Swyx-15ff
To register the Swyx application for federated services
Use this mode for federated services such as single sign-on, as well as for syncing Teams presence statuses, calendars, and contacts.
1 Unzip the "EntraID_PowerShell_Configuration.zip" file into a folder on your hard drive.
*The folder contains the files "RegisterSwyxEntraIDApp.ps1" and "README.md".
2 Read the README file.
3 Open a PowerShell console as an administrator (for example, by selecting "Run as Administrator" from the context menu).
4 If the execution of local scripts is blocked, configure the execution policy using the following command:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
5 Navigate to the folder containing the .ps1 file.
For example: cd 'C:\Users\<user.name>\Downloads\EntraID_PowerShell_Configuration\'
6 If necessary, run the following command to view detailed help for the script:
get-help -full RegisterSwyxEntraIDApp.ps1
7 Run the script using the following command:
.\RegisterSwyxEntraIDApp.ps1
8 Press the [1] key to select the Swyx application for federated services:
1) Swyx Federated Services
9 Press [Enter] to confirm.
10 Enter the desired name for the application, or press the [Enter] key to use the default name.
11 Confirm the registration by pressing [ Y ].
*The application is being registered. The following data will then appear:
SUCCESS
------------------------------------
Application ID:
Tenant/Domain ID:
Client Secret:
Secret expires:
OpenID Connect Metadata Document:
------------------------------------
12 Save the registration information in a safe place for the next step. In particular, be sure to keep the client secret in a secure location.
13 You can create a new identity provider configuration, see 4.21.3 Create identity provider configuration,
or
To update the login credentials for an existing configuration, see 4.21.5 Change login data for Entra ID.
How to register the Swyx app for Swyx Direct
Use this mode to register the Swyx Direct for Microsoft Teams application.
The integrated services in Entra ID have been configured for your Swyx installation.
 
With this registration type, the onboarding script temporarily assigns additional Microsoft Entra directory roles.
After successful deployment, remove only these temporary onboarding roles using the command provided below, see step (14).
 
 
In step (11), after logging in, the script checks whether there are available licenses with active service plans for TEAMS1 (Microsoft Teams) and MCOEV (Teams Phone), respectively. If a required license is missing or a service plan is inactive, the script terminates the process before any changes are made. To intentionally skip the license check, run the script with the -SkipLicenseCheck parameter. Next, confirm the changes displayed.
See Microsoft Service Plan Licenses on Azure.
 
1 Unzip the "EntraID_PowerShell_Configuration.zip" file into a folder on your hard drive.
*The folder contains the files "RegisterSwyxEntraIDApp.ps1" and "README.md".
2 Read the README file.
3 Open a PowerShell console as an administrator (for example, by selecting "Run as Administrator" from the context menu).
4 If the execution of local scripts is blocked, adjust the execution policy using the following command, if necessary:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
5 Navigate to the folder containing the .ps1 file.
For example: cd 'C:\Users\<user.name>\Downloads\RegisterSwyxEntraIDApp'
6 If necessary, run the following command to view detailed help for the script:
get-help -full RegisterSwyxEntraIDApp.ps1
7 Run the script using the following command:
.\RegisterSwyxEntraIDApp.ps1
8 Press the [2] key to select the Swyx application for Swyx Direct:
2) Swyx Teams Direct Routing
9 Press [Enter] to confirm.
10 Enter the desired name for the application, or press [Enter] to use the default name.
11 In the login dialog that appears, sign in with a Microsoft Entra administrator account that has the necessary permissions and can grant administrative approvals.
*The application is being registered. The following data will then appear:
SUCCESS
------------------------------------
Application ID:
Tenant/Domain ID:
Client Secret:
Secret expires:
OpenID Connect Metadata Document:
------------------------------------
12 Save the registration information in a safe place for the next step. In particular, be sure to keep the client secret in a secure location.
13 You can connect your Swyx system to Microsoft Teams using Swyx Direct, 4.23.1 Connect Swyx Direct to Microsoft Teams,
14 After successfully deploying Swyx Direct for Microsoft Teams, use the following command to remove the temporary directory roles assigned by the script solely for onboarding:
.\RegisterSwyxEntraIDApp.ps1 -RemoveOnboardingRoles -ApplicationId '<Application ID>'