All articles on building an Azure Bot Services deployment with SSO
- Azure Bot Services: Advanced deployment with SSO (Microsoft Teams): Intro
- Azure Bot Services: Advanced deployment with SSO (Microsoft Teams): AAD Portal
- Azure Bot Services: Advanced deployment with SSO (Microsoft Teams): Azure Portal
- Azure Bot Services: Advanced deployment with SSO (Microsoft Teams): Apps Developer Portal
- Azure Bot Services: Advanced deployment with SSO (Microsoft Teams): SSO and Graph API Nodes
Create a Microsoft Teams App
There are several ways to create a new Teams App.
In this tutorial, we create a Microsoft Teams App using Developer Portal.
- Sign in to Developer Portal and select Apps from the left pane.
- Select + New app.
- Enter app name and click Add.
Now you've successfully created a brand-new app, and you can see all the basic information of the new app.
Basic Information
- Go to Configure > Basic Information.
- Fill in all fields that are marked as required:
- Short description — add a summary about the usage of your app.
- Long description — add more information about your app, for example, some function or restrictions.
- Developer or Company name — add your company name, for example, Cognigy.
- Website — add your company website, for example, https://www.cognigy.com/.
- Privacy policy — add a link to the company privacy policy, for example, https://www.cognigy.com/privacy-policy.
- Terms of use — add a link to the company terms of use, for example, https://www.cognigy.com/legal-notice.
- Application (client) ID — enter the Client ID you copied and saved previously.
- (Optional) If you have permission with admin consent, you need to fill in the Microsoft Partner Network ID field.
- Click Save.
App Features
We need to specify which features our bot will use. It's important to note that not all features may support SSO, and some may require additional or different configurations:
- Go to Configure > App features.
- Select the Bot card.
- On the Bot page, select Enter a bot ID and enter the Client ID you previously copied and saved.
- Select Upload and download files. There is a strange bug that prevents you from sending attachments to other users if you don’t set it, so it needs to be set, even when no file handling is planned.
- Select Personal scope.
- Click Save.
Single sign-on
- Go to Configure > Single sign-on.
- In the Application ID URI field, add the api://botid-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx link where x is the previously copied and saved Client ID.
- Click Save.
Domains Section
- Go to Configure > Single sign-on.
- Add two domains:
- token.botframework.com — the domain for token authentication.
- mydomain.com — the domain where the Endpoint is hosted.
App package
- Go to Configure > App package.
- At the top of the page, click Download App package.
Package Fixing
- Unzip the content to a folder, you should get two images and a manifest.json file.
- Open the file in a code editor such as Visual Studio Code.
- You can make some small final adjustments before you can publish it. For example:
- Around line 6, there’s a key packageName, change the value to a different value than com.package.name as SSO won’t work otherwise.
- Add a key to the top level "permissions": ["identity", "messageTeamMembers"]
- Your manifest should now look like this. Save it.
- Select the modified manifest.json and the other files and create a new .zip folder.
- Make sure it’s just these files and not a folder in the package above.
Cognigy.AI Azure Bot Services Endpoint
Check whether all required fields are filled in the Cognigy.AI Azure Bot Services Endpoint:
Single-tenant:
Multi-tenant:
Upload the Teams App
- Open your Teams client or https://teams.microsoft.com.
- In the bottom-left corner, click Apps.
- Click Upload a custom app and choose the newly created package. You will see a summary of your app, its permissions, and the Add button.
- Click Add, and the bot should become a contact you can chat with:
- If you receive an error message, open the browser debugging tools and check if you get further information. Otherwise, you need to check all previous steps to see if they were done correctly.
- If the app is successfully added, all messages to the bot should now be delivered to the flow linked in the Azure Bot Services Endpoint.
To use SSO, you need to apply some logic to the Cognigy Flow.
Comments
0 comments