For virtual SBC to be connected with the M365 Tenant and this will be done via Azure App Registration - Direct Routing SBA - Microsoft Teams | Microsoft Docs
above article shows given the requirement but thought it will be better if someone write about the steps
It has 4 major steps (Not really major :) )
1. Register the application
2. Set the implicit grant tokens
3. Set the API permissions
4. Create the client secret
However, for above steps even to start you will required the Azure Tenant Permission after you create the vSBC on it.
Following screen you will receive if permission is not available when you try to create an app on Azure AD
Permission require: for this question to answer wont be able to find it on above Direct Routing SBA article and it will be mention on this - Quickstart: Register an app in the Microsoft identity platform - Microsoft Entra | Microsoft Docs
Once you have above permission/one of the permission
Cloud Application/Application administrator or Developer
Access the portal - https://portal.azure.com or https://aad.portal.azure.com
Create App registration and provide a name for Application. select the account/tenant name and click register.
Redirect url can be optional at this point
There will be Application (client) ID, Object ID, Directory (tenant) ID will be there.
Next we will required to add the platform and it is under authentication section. Select authentication and click add platform on that windows will take us to platform types and we will required to choice web and provide/insert url given in the Microsoft Article provided.
make sure check the following options in the implicit grant and hybrid flows and click configure.
Next will be Application secret
I copied the Secret ID (which is wrong) instead of that it should be Value should be copied and thats the client secret.