简体   繁体   中英

How to send proactive message in MS Teams

As a part of a use case, I want to send user a proactive message from bot. I am following this document related to sending proactive messages to bot.( Send Proactive message )

I am trying to send proactive message to the user when the user has not interacted with bot previously. For this scenario, I need to call 'Install App for Users' graph API and cache the necessary values from the conversation Update event bot receives upon installation.( Send proactive message when user has not interacted with bot )

However, the permissions required to call this API are marked in private preview mode on the permissions reference page. ( Permission Reference ) I want to know if there is any other way to send proactive message to bot other than the way mentioned above. I am attaching the screenshot of documentation for reference.

私人预览中的权限 私人预览中的权限

As discussed this issue in Mail.

To install an app in the personal scope for all users in the tenant, you can do one of the following:

  1.  App only permission: TeamsAppInstallation.ReadWriteForUser.All
  2.  Delegated permission: TeamsAppInstallation.ReadWriteForUser -> but the token must belong to that of a Teams Service or Tenant Admin.

The 'Self' equivalent of these permissions allow the caller to install only those Teams app that have declared the app that is making the request as webApplicationInfo.Id in its manifest.

From the Teams App Install permissions reference , installing an application for the user can also use this permission: TeamsAppInstallation.ReadWriteForUser . Although this is more privileged permission and requires admin consent, this is what should be used given that TeamsAppInstallation.ReadWriteSelfForUser is in private preview.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM