How do I get Okta to return a sorted API response? - okta

I need Okta to return the resultset of /api/v1/apps/{{appId}}/users ordered by the created field. I see that I can filter: https://developer.okta.com/docs/reference/api/events/#filters. But how do I sort?

You can use the sortBy and sortOrder parameters to sort the user list you want. See the documentation for listing the users on https://developer.okta.com/docs/reference/api/users/#list-users:
sortBy - Specifies field to sort by (for search queries only)
sortOrder - Specifies sort order asc or desc (for search queries only)

There is no sorting functionality available for Okta's Apps API according to Okta's forum and their online documentation. The Apps API is only capable of filtering: https://developer.okta.com/docs/reference/api/apps/#list-users-assigned-to-application. Sadly, this is the one I needed.
However, as #Progman mentioned, Okta does support sorting on their User API: https://developer.okta.com/docs/reference/api/apps/#list-users-assigned-to-application

Related

How to replicate Who bot people search criteria?

Need help in implementing people/user search in the entire organization with a fuzzy search
Microsoft Graph API
People Search
https://graph.microsoft.com/v1.0/me/people/?$search="Mary"
Perform a fuzzy search but this is done only on people collection of the signed-in user
Which doesn't give a result based on the entire organization
Users Search
Doesn't support following ODATA Parameters
1.$Search https://graph.microsoft.com/v1.0/users?$search="Mary" is not supported
2.$filter doesn't support $filter=substring(displayName, 1) eq 'abc, xyz'
3.contains is also not supported $filter=contains(CompanyName,'Alfreds')
Seems your are trying to search user among your organization. But the way you tried is not supported.
If you want to search organization user you could try in following way
https://graph.microsoft.com/v1.0/users?$filter=startswith(displayName,'Kiron')
It will show all the name start with given value. See the screen shot
Please refer to this official docs

How can I search users by id

Correct me if I'm wrong but it appears that the admin-sdks's Users>list operation doesnt support searching users by ID (According to the docs here).
For example I use the Members api to get all the members of a given group. It returns a list or User Ids.
The only way to fetch data about those users is to call the get operation for each user. Seems pretty inefficient to me.
How come this functionality is not implemented (or perhaps I'm missing something)?
Search feature means you have a pattern and you want the list of all entities which relate to given pattern. It assumes you don't have the unique id of the entity you need. The output of search feature is the list of unique ids with optional additional minimal information which matches to search pattern. To get full information of the individual entity, you need to use unique id and use get information feature.
However, if you already have the unique id, then you don't need the search function. Directly use get information feature.
So google has provided sufficient functionality. If you already have userid, why using search call, use retrieve user call directly.

Google Analytics Filters

What expression would be the correct filter to include only data from urls that contain a specific param. For example I have &utm_medium=paid contained in a referral url. What expression would I use?
UTM parameters are automatically mapped to the campaign fields in Google Analytics. The name of the fields in the filters depends on if you are using a (permanent) view filter or an ad hoc filter in the reporting interface.
In the view filters you'd use a custom filter with "campaign medium" as filter field.
In the ad hoc-filters (the box top right of the data tables) and in segmentation it's simply called "campaign". In the ad hoc filters the field is only available if the data table itself displays the campaign as (primary or secondary) dimension.
If you want to filter by a parameter that is not an Analytics utm parameter you would use the request uri (view filters) or page (ad hoc filters) field. Most people have filters that strip url parameters before the data is sent to the reports, so this might not work properly in your ad hoc filters.

Power BI Embed URL-multiple filters

I have been trying to filter my embedded PBI report using the filter query syntax:
&$filter={tableName/fieldName} eq '{fieldValue}'
and this works for me.
However, when I apply more than one filter, the PBI report is filtered only according to the last $filter and other filters are disregarded.
Is there a way to add multiple filters in the Power BI embed URL?
With the release of 2.0.0 you can now get and set filters at report scope and page scope. We currently don't support visual scope but it is planned to come in the future.
See: https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters
for more information on how to use the SDK to apply filters.
You can also set filters during load.
https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details
You can see a working demo of using filters here:
https://microsoft.github.io/PowerBI-JavaScript/demo/filters.html
If the filters you are applying need to be secure (they can't be modified by the client) then you must use RLS on the report, and then add the username and/or role claims to your JWT token. Then requests to view the report with this token will only show data for allowed user or role.
The OData $filter parameter only supports a subset of filter capabilities. If you want to have more complex values or conditions it is recommended to use the SDK to construct filter objects.

Google portable contacts api sort order not working

I am using this path to grab contacts from google after user is oauth2 authenticated.
path =
"http://www-opensocial.googleusercontent.com/api/people/#me/#all/?count=500&fields=name,displayName,emails&sortBy=name"
Strangely the sortBy name is not working.
It gives:
First a list of unordered contacts with no order.
Then it gives contacts with name in alphabetical order.
I want all contact names sorted by alphabetical order.
What is the work around for this problem ?
A quick reply will be appreciated.
It's a google bug.
Check my discussion with Jospeh Smarr google opensocial apis lead.
http://groups.google.com/group/portablecontacts/browse_thread/thread/1a3e2d8f5b437e7c?pli=1

Resources