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

SDK needs to support model filters for AllRetainedMessages #2811

Open
adrianmander opened this issue Jan 27, 2025 · 0 comments
Open

SDK needs to support model filters for AllRetainedMessages #2811

adrianmander opened this issue Jan 27, 2025 · 0 comments
Labels
dependency:metadata Awaiting fix from core dependency project module type:feature New experience request

Comments

@adrianmander
Copy link

adrianmander commented Jan 27, 2025

Is your feature request related to a problem? Please describe the problem.

I want to make requests to the AllRetainedMessages endpoint. For paid subscriptions this requires the Model parameter to be set.

Doing this doesn't work yet.

    RequestInformation historicalMessagesRequest = _graphServiceClient
        .Users[userGuid]
        .Chats
        .GetAllRetainedMessages
        .ToGetRequestInformation(configuration =>
        {
            // configuration.QueryParameters.Model = "ModelA" ; todo this doesn't work yet
        });

I have a work around that's low level and gross.

historicalMessagesRequest.UrlTemplate =
    "{+baseurl}/users/{user%2Did}/chats/getAllRetainedMessages()" +
     "{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top,model*}";

 historicalMessagesRequest.QueryParameters["model"] = "ModelA";

You have to both manually add your licensing model to the query parameters, and adjust the url template so that this model goes to the actual request url made by the SDK. This is hokey and janky.

Describe the solution you'd like.

Can we just have this work, for parity with AllMessages?

    RequestInformation historicalMessagesRequest = _graphServiceClient
        .Users[userGuid]
        .Chats
        .GetAllRetainedMessages
        .ToGetRequestInformation(configuration =>
        {
            configuration.QueryParameters.Model = "ModelA";  // Just make this compile and work
        });

Additional context?

No response

@adrianmander adrianmander added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:feature New experience request labels Jan 27, 2025
@andrueastman andrueastman added dependency:metadata Awaiting fix from core dependency project module and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Jan 29, 2025
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:feature New experience request
Projects
None yet
Development

No branches or pull requests

2 participants