Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get callTranscript Content does not work in SDK #2505

Open
MikeYeager opened this issue May 21, 2024 · 3 comments
Open

Get callTranscript Content does not work in SDK #2505

MikeYeager opened this issue May 21, 2024 · 3 comments
Labels
dependency:metadata Awaiting fix from core dependency project module type:bug A broken experience

Comments

@MikeYeager
Copy link

MikeYeager commented May 21, 2024

Describe the bug

I am trying to download transcripts and recordings using Microsoft.Identity.Web.GraphServiceClient 2.18.1. The docs ?? say this:

// Code snippets are only available for the latest version. Current version is 5.x

// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Users["{user-id}"].OnlineMeetings["{onlineMeeting-id}"].Transcripts["{callTranscript-id}"].Content.GetAsync();

Which should return a Task<Stream> according to Intellisense. When I run this code, I get the following exception, Invalid format 'application/octet-stream, application/json' specified. with a 400 response code. If I remove .Content. I do get the transcript information.

Expected behavior

I would expect a stream to be returned with a 200 response. application/octet-stream would seem to be the correct content type for that.

How to reproduce

n/a

SDK Version

2.18.1

Latest version known to work for scenario above?

No response

Known Workarounds

I can download the transcript via postman if I specify the $format=text/vtt query parameter. Can't find a work-around within the SDK.

Debug output

Click to expand log ```

Invalid format 'application/octet-stream, application/json' specified. Exception Attributes:
Message: Invalid format 'application/octet-stream, application/json' specified.
Exception type: Microsoft.Graph.Models.ODataErrors.ODataError
Source: Microsoft.Kiota.Http.HttpClientLibrary
Thrown by code in method: MoveNext
Thrown by code in class: d__28
Stack Trace:
Method: Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.ThrowIfFailedResponse(HttpResponseMessage response, Dictionary2 errorMapping, Activity activityForAttributes, CancellationToken cancellationToken) Method: Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.SendPrimitiveAsync[ModelType](RequestInformation requestInfo, Dictionary2 errorMapping, CancellationToken cancellationToken) Method: Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.SendPrimitiveAsync[ModelType](RequestInformation requestInfo, Dictionary2 errorMapping, CancellationToken cancellationToken) Method: Microsoft.Graph.Users.Item.OnlineMeetings.Item.Transcripts.Item.Content.ContentRequestBuilder.GetAsync(Action1 requestConfiguration, CancellationToken cancellationToken) Line #: 500 -- Method: CleverTeamsIntegration.CleverTeamsIntegration.TestGetTranscriptInfo(HttpRequestData req) -- Source File: C:\Repos\CleverProducts\Clever.Video.TeamsIntegration\CleverTeamsIntegration\CleverTeamsIntegration.cs

</details>


### Configuration

- OS: Windows 11  x64

### Other information

_No response_
@MikeYeager MikeYeager added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels May 21, 2024
@andrueastman
Copy link
Member

Thanks for raising this @MikeYeager

Are you able to share a sample URL that works via postman to help compare with what path the SDK is calling? Could you also share a link to the docs where the code snippet is from?

@andrueastman andrueastman added Needs: Author Feedback status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels May 22, 2024
@MikeYeager
Copy link
Author

@andrueastman Sorry for the delay, was sidelined with BUILD. The docs can be found here: https://learn.microsoft.com/en-us/graph/api/calltranscript-get?view=graph-rest-1.0&tabs=csharp Check out Examples 2 & 3 (choose C#). In example 3 it mentions you can set requestConfiguration.QueryParameters.Format = "text/vtt", but no such parameter exists. I even tried setting a value for a QueryParameter with SetValue, but that doesn't work either.

I exported the PostMan call as a C# snippet. Notice it's sending a query param to return text/vtt.

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://graph.microsoft.com/v1.0/users/ce7d3c3d-6047-450e-b6fa-6603a4a0ecc4/onlineMeetings/MSo1ODNjNjg0Yy1kNGIyLTQ0MTQtYTFhYy05NjExOTgxMDc3MzkqMCoqMTk6bWVldGluZ19ORFpqWXpRM1pXVXROVE14WmkwME9XSXlMVGxpTkdFdFpHWTRaVE0yTldFNE9UTmhAdGhyZWFkLnYy/transcripts/MSMjMCMjODNmMjYxMjEtYTNmMi00ZDgzLWJkN2UtZGQzYTQwYmM0ZjU5/content?$format=text/vtt");
request.Headers.Add("Authorization", "Bearer eyJ0eXAiO ... n_w");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

@andrueastman
Copy link
Member

This is caused by the metadata missing the $format parameter. Filed microsoftgraph/msgraph-metadata#632

@andrueastman andrueastman added dependency:metadata Awaiting fix from core dependency project module and removed Needs: Attention 👋 status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency:metadata Awaiting fix from core dependency project module type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

2 participants