microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
SDK needs to support model filters for AllRetainedMessages
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the GetAllRetainedMessages request entry point and inspect how its ToGetRequestInformation configuration exposes QueryParameters, comparing it with AllMessages. Trace the generated request URL handling to confirm where the model parameter must be declared. Done means configuration.QueryParameters.Model compiles and the model value is included in requests to AllRetainedMessages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100