Steps to reproduce
Create and execute a build indexed query for Cusomer Users specifying pageSize and index:
IQuery query = QueryFactory.getInstance().buildIndexedQuery(pageSize, pageIndex, null, new Sort("userPrincipalName",SortDirection.DESCENDING)));
return customer.getUsers().query(query);
Expected behavior
Get a SeekBasedResourceCollection with a subset of users for customer sorted by
userPrincipalName
Example. This is the complete list of users for our test customer (I am just showing the user names to make it more legible):
[
"Admin",
"User 1",
"User 2",
"User 3",
"User 4",
"User 5"
]
For the following buildIndexedQuery (pageSize = 2, index = 0, sortField = userPrincipalName , sortDirection = descending):
IQuery query = QueryFactory.getInstance().buildIndexedQuery(2,0,null,new Sort("userPrincipalName",SortDirection.DESCENDING)) );
The result should be:
Actual behavior
No matter which value we specify for sort or sortDirection, the results always are sorted by the default sorting field (userPrincipalName if I am not wrong) and direction ascending..
Diagnostic logs
I've been able to debug the whole process and the request generated for CustomerUsersCollectionOperations is the following:
https://api.partnercenter.microsoft.com/v1/customers/[CUSTOMER_ID]/users?&size=2&null=%userPrincipalName%22&null=%22descending%22
Environment
I've tested from Linux Mint with Eclipse Oxygen.
Partner center SDK:
I've tested 1.12.0 and 1.8.0. Same result for both.
Steps to reproduce
Create and execute a build indexed query for Cusomer Users specifying pageSize and index:
Expected behavior
Get a SeekBasedResourceCollection with a subset of users for customer sorted by
userPrincipalName
Example. This is the complete list of users for our test customer (I am just showing the user names to make it more legible):
For the following buildIndexedQuery (pageSize = 2, index = 0, sortField = userPrincipalName , sortDirection = descending):
IQuery query = QueryFactory.getInstance().buildIndexedQuery(2,0,null,new Sort("userPrincipalName",SortDirection.DESCENDING)) );The result should be:
Actual behavior
No matter which value we specify for sort or sortDirection, the results always are sorted by the default sorting field (userPrincipalName if I am not wrong) and direction ascending..
Diagnostic logs
I've been able to debug the whole process and the request generated for CustomerUsersCollectionOperations is the following:
https://api.partnercenter.microsoft.com/v1/customers/[CUSTOMER_ID]/users?&size=2&null=%userPrincipalName%22&null=%22descending%22
Environment
I've tested from Linux Mint with Eclipse Oxygen.
Partner center SDK:
I've tested 1.12.0 and 1.8.0. Same result for both.