botbuilder-python icon indicating copy to clipboard operation
botbuilder-python copied to clipboard

Inconsistencies with Microsoft Graph & Bot Framework APIs

Open razki-imper opened this issue 7 months ago • 1 comments

Version

4.7.10

Describe the bug

We’re encountering a critical issue using the Microsoft Graph and Bot Framework APIs. We suspect this may be related to a recent change on Microsoft’s backend and are requesting immediate support.

Our application flow involves programmatically inserting our Teams app into meeting chats using the Microsoft Graph API.

After the app is inserted, we use the TeamsConnectorClient from the Bot Framework SDK to trigger a modal popup for the users.

This integration has worked reliably in the past. However, starting late last week or early this week, we’ve seen inconsistent behavior: for many users, the modal no longer appears at all. This has significantly degraded the user experience.

Interestingly, when we manually insert the app into the meeting chat using the Teams UI instead of the Graph API, everything works as expected. The UI appears to use an internal API (which we’ve identified), but this API is undocumented (and cannot be used with the app), not publicly supported, and not suitable for production automation.

Another thing to note, our app is not in the marketplace yet, and is uploaded to the tenant's marketplace with msgraph api or manually.

To Reproduce

Steps to reproduce the behavior:

  1. using this sample code & an app in your tenant, insert the app into a meeting chat you have graph_client = GraphServiceClient(credential)

     logger.info(f"Attempting to install app {TEAMS_APP_ID} to chat {CHAT_ID}")
    
     # Create the request body
     request_body = TeamsAppInstallation(
         additional_data={
             "[email protected]": f"https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{TEAMS_APP_ID}"
         }
     )
    
     # Add permissions if needed
     request_body.consented_permission_set = TeamsAppPermissionSet(
         resource_specific_permissions=[
             TeamsAppResourceSpecificPermission(
                 permission_value="OnlineMeetingNotification.Send.Chat",
                 permission_type=TeamsAppResourceSpecificPermissionType.Application,
             ),
             TeamsAppResourceSpecificPermission(
                 permission_value="TeamsActivity.Send.User",
                 permission_type=TeamsAppResourceSpecificPermissionType.Application,
             )
         ]
     )
    
     # Make the installation request
     result = await graph_client.chats.by_chat_id(CHAT_ID).installed_apps.post(request_body)
     logger.info(f"App installation successful: {result}")
     return result 
    
  2. using botframework python api, try to send a modal using TeamsConnectorClient to /v1/meetings/{meetingId}/notification and this kind of notification

model.MeetingNotification(
            type='targetedMeetingNotification',
            value=model.TargetedMeetingNotificationValue(
                recipients=recipients,
                surfaces=[
                    model.MeetingStageSurface(
                        surface='meetingStage',
                        content_type='task',
                        content=model.TaskModuleContinueResponse(
                            value=model.TaskModuleTaskInfo(
                                height=message_height,
                                width=message_width,
                                title=message_title,
                                url=message_url,
                            ),
                        ),
                    ),
                ],
            ),
        )

some users in the meeting may not experience the modal pop up

razki-imper avatar Jul 17 '25 08:07 razki-imper

@axelsrz - Can you take a look at this?

stevkan avatar Jul 18 '25 18:07 stevkan