Application Configuration inĀ Azure Portal for OAuth2 Account to use in Teams
Overview
The Snaps in the Microsoft Teams Snap Pack require an OAuth2 account to access the resources in Azure. For the OAuth2 account to authorize successfully, create, and configure an application corresponding to the account as shown in the workflow.
You must complete steps one to three in the Azure Portal and the remaining steps in the Snap account (SnapLogicĀ®Platform).
Prerequisites
An Azure account with a free subscription to create the application.
Key Steps in the Workflow
Create an Application in the Azure Portal
Log in to the Microsoft Azure Portal.
Navigate to Azure services > Microsoft Entra ID.
Navigate to AddĀ > App registration.
On the Register an application page, specify theĀ name for registering the application and clickĀ Register. Learn more about creating an application at Quickstart: Register an app in the Microsoft identity platform - Microsoft identity platform.
ToĀ use an existing application, navigate to Portal Home > Azure Active Directory > App registrations > All applications. In the search box, specify the application name you want to use. Details on registered application is display in the search list.
Define Permissions
The Teams Online Snap Pack supports the following three types of accounts:
The permissions for the registered application are either Delegated or Application permissions based on the account types. Select Delegated permissions for OAuth2 User Accounts and Application permission for OAuth2 Application Accounts.
On the left navigation panel, navigate to Manage, selectĀ API permissionsĀ > Add a permission.
On the Request API permissionsĀ window,Ā selectĀ Microsoft GraphĀ > Delegated permissions forĀ the OAuth2 User accountĀ andĀ Application permissions for the OAuth2 Application Account.
Select the required permissions from Files, Users, and Teams. Choose the minimum API permissions listed under Scopes and Permissions Required for Teams.
Click Add Permissions. View all the permissions added under Configured permissions.
Ā
ClickĀ Grant admin consent confirmation and selectĀ Yes.
In the navigation panel, clickĀ OverviewĀ andĀ select Add a Redirect URI. You will be redirected to the Platform configurations page.
Ā
UnderĀ Platform configurations,Ā clickĀ Add a platform.
The Configure platforms window displays.
SelectĀ Web and specify the Redirect URI in the following format:Ā
https://<control-plane-name>.snaplogic.com/api/1/rest/admin/oauth2callback/<snap-pack-name>
where the<control-plane-name>
corresponds to the domain part of your SnapLogic URLāelastic (global control plane) or emea (EMEA control plane).
For example:https://emea.snaplogic.com/api/1/rest/admin/oauth2callback/teams
https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/teams
SelectĀ Web and specify either of the following Redirect URIs based on the region your server is located:
ClickĀ Configure. A popup message displays indicating that the application is successfully updated.
On the Platform configurations page, click Save.
Locate the Application Credentials in the Azure Portal
To authorize your account in SnapLogic, you must have the following application credentials:
Application (Client) ID
Directory (Tenant) ID
Client secret value
On the application page, navigate to Overview.
Under Essentials, note the Application (client) ID andĀ Directory (tenant) ID needed for the Snap account.
In the navigation panel, select Manage > Certificates & secrets.
On the Certificates & secrets page, click + New client secret.
In the Add a client secret window, enter the Description, select an option for Expires from the dropdown list, and clickĀ Add.Ā
The Client value and Secret ID areĀ generated.Ā This value and ID are required to configure the OAuth2 account.
You can copy the Client secret value only after it is generated. Note that this value is displayed only once, so ensure to copy it securely.
Scopes and Permissions Required for Teams API
Microsoft Teams exposes a few granular permissions that control the access that apps have to resources. When users sign into your app, they are required to consent to these permissions.Ā
Delegated permissions (work or school account only*) | |||
---|---|---|---|
Permission | Display String | Description | Admin Consent Required? |
Channel.Create | Create channels | Create channels in any team, on behalf of the signed-in user. Ā | Yes |
ChannelMember.ReadWrite.All | Add and remove members from channels. | Add and remove members from channels, on behalf of the signed-in user. Also allows changing a member's role, for example from owner to non-owner. | Yes |
ChannelMessage.Send | Send channel messages | Allows an app to send channel messages in Microsoft Teams, on behalf of the signed-in user. Ā | No |
ChannelSettings.ReadWrite.All | Read and write the names, descriptions, and settings of channels. | Read and write the names, descriptions, and settings of all channels, on behalf of the signed-in user. | No |
ChannelSettings.ReadWrite.Group | Update the names, descriptions, and settings of this teamās channels. | Update this group's channel names, channel descriptions, and channel settings, without a signed-in user. | No |
Directory.AccessAsUser.All | Access directory as the signed-in user | Allows the app to have the same access to information in the directory as the signed-in user. | Yes |
Directory.ReadWrite.All | Read and write directory data | Allows the app to read and write data in your organization's directory, such as users, and groups. It does not allow the app to delete users or groups, or reset user passwords. | Yes |
Group.ReadWrite.All | Read and write all groups | Allows the app to create groups and read all group properties and memberships on behalf of the signed-in user. Also allows the app to read and write calendar, conversations, files, and other group content for all groups the signed-in user can access. Additionally allows group owners to manage their groups and allows group members to update group content. | Yes |
GroupMember.ReadWrite.All | Read and write group memberships | Allows the app to read and write group memberships. | No |
TeamMember.ReadWrite.All | Add and remove members from teams. | Add and remove members from teams, on behalf of the signed-in user. Also allows changing a member's role, for example from owner to non-owner. | Yes |
TeamSettings.ReadWrite.All | Read and change teams' settings | Read and change all teams' settings, on behalf of the signed-in user. | Yes |
User.Read.All | Read all users' full profiles | Allows the app to read the full set of profile properties, reports, and managers of other users in your organization, on behalf of the signed-in user. | Yes |
Application permissions | |||
Permission | Display String | Description | Admin Consent Required? |
Channel.Create | Create channels. | Create channels in any team, without a signed-in user. Ā | Yes |
Channel.Create.Group | Create channels in this team. | Create channels in this group, without a signed-in user. | No |
ChannelMember.ReadWrite.All | Add and remove members from all channels. | Add and remove members from all channels, without a signed-in user. Also allows changing a member's role, for example from owner to non-owner. | Yes |
Directory.ReadWrite.All | Read and write directory data | Allows the app to read and write data in your organization's directory, such as users, and groups, without a signed-in user. Does not allow user or group deletion. | Yes |
Group.ReadWrite.All | Read and write all groups | Allows the app to create groups, read and update group memberships, and delete groups. Also allows the app to read and write calendar, conversations, files, and other group content for all groups. All of these operations can be performed by the app without a signed-in user. Ā | Yes |
GroupMember.ReadWrite.All | Read and write group memberships | Allows the app to list groups, read basic properties, read and update the membership of the groups this app has access to without a signed-in user. Group properties and owners cannot be updated and groups cannot be deleted. | Yes |
TeamMember.ReadWrite.All | Add and remove members from all teams. | Add and remove members from all teams, without a signed-in user. Also allows changing a team member's role, for example from owner to non-owner. | Yes |
TeamSettings.ReadWrite.All | Read and change teams' settings | Read and change all teams' settings, without a signed-in user. | Yes |
TeamSettings.ReadWrite.Group | Update the settings for this team. | Read and write this team's settings, without a signed-in user. | No |
Teamwork.Migrate.All | Manage migration to Microsoft Teams | Creating and managing resources for migration to Microsoft Teams | Yes |
User.Read.All | Read all users' full profiles | Allows the app to read the full set of profile properties, group membership, reports and managers of other users in your organization, without a signed-in user. | Yes |
*Ā Personal Microsoft accounts are not supported.Ā
Specify the Credentials And Validate the Snap account
Navigate to the Snap of your choice and configure the OAuth2 account with the details from the Azure portal's registered application. Refer to Teams Dynamic OAuth2 Account, Teams OAuth2 Application Account, or Teams OAuth2 User Account for further account configuration.
Select theĀ Auto-refresh tokenĀ checkbox in the account settings and clickĀ Apply.
ClickĀ Authorize. The Access and Refresh tokens are generated. You will be redirected to the sign-in page of the Azure Portal.
Sign in to Azure Portal with valid credentials to redirect to the Snap Edit account settings dialog. The Access and Refresh tokens are autopopulated but encrypted in the Account settings.
Validate the Snap Account.
Troubleshooting
Common Errors | Reason | Response |
---|---|---|
Error 401 | Token is invalid | Provide a valid token and reauthorize the account. |
The redirect URI specified does not match the reply URI configured for the application. | Incorrect redirect URI specified by user. | Add the following redirect_uri: |
URL error when invoking the operation | Ensure the tenant domain name is correct. | Ensure that Directory (tenant) ID noted from the application is in the correct format. Example: 2060aafa-89d9-423d-9514-eac46338ec05 |
Frequently Asked Questions
Related Content
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
Ā© 2017-2024 SnapLogic, Inc.