diff --git a/samples/app-HR-talent/csharp/src/Services/GraphApiService.cs b/samples/app-HR-talent/csharp/src/Services/GraphApiService.cs index 29e8c8cc90..8e26c4d873 100644 --- a/samples/app-HR-talent/csharp/src/Services/GraphApiService.cs +++ b/samples/app-HR-talent/csharp/src/Services/GraphApiService.cs @@ -58,7 +58,7 @@ public GraphApiService( var installedApps = await graphClient.Users[upn].Teamwork.InstalledApps .Request() .Filter($"teamsApp/externalId eq '{_configuration["TeamsAppId"]}'") - .Expand("teamsApp") + .Expand("teamsAppDefinition") .GetAsync(cancellationToken); var app = installedApps.FirstOrDefault(); diff --git a/samples/graph-activity-feed-broadcast/csharp/ActivityFeedBroadcast/Controllers/HomeController.cs b/samples/graph-activity-feed-broadcast/csharp/ActivityFeedBroadcast/Controllers/HomeController.cs index d045c80069..95346a3cb0 100644 --- a/samples/graph-activity-feed-broadcast/csharp/ActivityFeedBroadcast/Controllers/HomeController.cs +++ b/samples/graph-activity-feed-broadcast/csharp/ActivityFeedBroadcast/Controllers/HomeController.cs @@ -123,7 +123,7 @@ await UtilityHelper.ForEachAsync(usersList, partitionCount, async users => { { var installedApp = await graphClient.Users[users.Id].Teamwork.InstalledApps .Request() - .Expand("teamsApp") + .Expand("teamsAppDefinition") .GetAsync(); var response = new HttpResponseMessage(); diff --git a/samples/tab-request-approval/csharp/TabRequestApproval/Controllers/HomeController.cs b/samples/tab-request-approval/csharp/TabRequestApproval/Controllers/HomeController.cs index f8074bf155..5f3edf0d3c 100644 --- a/samples/tab-request-approval/csharp/TabRequestApproval/Controllers/HomeController.cs +++ b/samples/tab-request-approval/csharp/TabRequestApproval/Controllers/HomeController.cs @@ -123,13 +123,13 @@ public async Task SendNotificationToManager(RequestInfo taskInfo) .GetAsync(); // Retrieve installed apps for the user from Microsoft Graph API - var installedApps = await graphClient.Users[user.Id].Teamwork.InstalledApps + var installedApps = await graphClient.Users[user.UserPrincipalName].Teamwork.InstalledApps .Request() - .Expand("teamsApp") + .Expand("teamsAppDefinition") .GetAsync(); // Filter installed apps to find the one with DisplayName "Tab Request Approval" - var installationId = installedApps.Where(id => id.TeamsApp.DisplayName == "Tab Request Approval").Select(x => x.TeamsApp.Id); + var installationId = installedApps.Where(id => id.TeamsAppDefinition.DisplayName == "Tab Request Approval").Select(x => x.TeamsAppDefinition.Id); // Check if there is at least one matching installationId if (installationId.Any()) @@ -153,13 +153,13 @@ public async Task SendNotificationToManager(RequestInfo taskInfo) // Create template parameters for the notification var templateParameters = new List() - { - new Microsoft.Graph.KeyValuePair - { - Name = "approvalTaskId", - Value = taskInfo.title - } - }; + { + new Microsoft.Graph.KeyValuePair + { + Name = "approvalTaskId", + Value = taskInfo.title + } + }; // Send the activity notification using Microsoft Graph API await graphClient.Users[user.Id].Teamwork .SendActivityNotification(topic, "approvalRequired", null, previewText, templateParameters)