LDAP Query to exclude local proxyaddresses - active-directory

I want to write an LDAP Query which excludes all the proxyaddresses from an user object which end in .local. I wrote a query like this (!(proxyAddresses=*#*.local)), however this removes all addresses from users which have a proxyaddress ending in local. I have been looking on the internet for days, however I didn't come up with a working solution. Any ideas?

An LDAP query allow you to retreive objects where attibutes match some values. For each object you can retreive the attributes you want but if an attribute is multi valued you can't select in a query the values you want. You retreive all the values for an attribute or none. You client program need to sort the result to eliminate the adresses you don't want.

Related

Querying Column Name as Variable Using Tableau Custom SQL

I am building a lookup tool that will take Column Name and Table Name as inputs from Tableau as Parameters, and plug those in to Tableau Custom SQL as Parameter values, but I cannot find a way to make the Column Name dynamic in the select query.
Here is the idea:
Select ParameterColumnName
FROM TABLE(ParameterTableName)
I have investigated Snowflake's "IDENTIFIER" commands, but those seem to work only in the FROM clause of the query. I have tested with a static column name and dynamic table name and that works fine.
I have also explored setting variables with the parameter column name values, but I cannot seem to use "SET" in Tableau Custom SQL--it does not recognize SET. Appreciate any pointers.
Update: This post appears to address why I cannot set variables from Custom SQL, but if that's not it, let me know!

Mule Salesforce connector in query operation. List of Maps as input

I have a huge list of Ids and Names for Contacts defined in this simple DW script. Let's show just two for simplicity:
[
{id:'169057',Name:'John'},
{id:'169099',Name:'Mark'}
]
I need salesforce connector to execute a single query (not 1000 unitary queries) about this two fields.
I expect the connector to be able to use a List of Maps as input, as it does using update/insert operations. So, I tried with this Connector config:
I am getting as response a ConsumerIterator. If I do a Object to String transformer but I am getting an empty String as response.
I guess must be a way of executing a big query in just one API call... But I am not finding it. Have in mind I need to use two or more WHERE clauses.
Any idea? Thanks!
I think you need to create two separate list for id and Name values from your input and then use those list in the query using IN.
Construct id list to be used in where clause. This can be executed inside for each with batch size 1000.
Retrieve name and id from contact for each batch
select id, name from contact where id in (id list)
Get the desired id's by matching name retrieved in step 2 within mule.

Azure Search - hard-code a string value into a field in an index

This one is for the MS Azure Search team, unless someone else has run into this and found a resolution for it.
I'm creating an index which is importing data from a SQL Server Database. I would like to add a field to the index whose value is just "OK" for every document. This field does not exist in the database and we do not want to add it there.
Is it possible to add a hard-coded field to an Azure Search index which auto-populates with the given string (in this case, "OK") for all documents that get imported?
Injecting constant values isn't currently possible with indexers - you would need to add this to the table, or create a SQL query that SELECTs that value, and use that query as your Azure Search datasource.
However, we've seen several customers ask for this, so please vote for this suggestion: Provide field mapping function to inject a constant value into the index. Thanks!

How do I write a LDAP Query to search an OU for users that do NOT have an email address?

I know how to search AD to find all users with an email address but I need to include the syntax for a LDAP Query, can you help? Also, how would I export this list to excel?
Unfortunately, there is no way to determine an empty or null value using an LDAP query - what you would have to do is query all users, then write some business logic to find the ones with empty values in the mail property.
Finding all of them is quite easy, you could simply do :
(&(objectClass=user)(mail=*))

is it feasible to add multiple index parameters in , Full text search API ? google app engine

I need to run a search query like this : SELECT from results WHERE owner=mike,john,tom ...etc which should provide a concatenation of the items owned by those usernames. There may be about 100-200 usernames in the query. Would be feasible to do this using the full text search API (I already use it for keyword queries) using the usernames as filters (e.g. filter(1)=mike&filter(2)=john etc ) or I should try some kind of datastore join operation ?
You could construct a query like this:
owner:mike OR owner:john OR owner:tom etc., but this will not be efficient for a large number of possible owner values.
Instead, consider whether you could group the owners according to some application semantics (e.g. some owners in 'usergroup1', some in 'usergroup2', etc.), and then instead query for documents with e.g. usergroup:usergroup1.
Alternately, if you could assign each owner a numeric value (that makes sense for your application), you can use numeric comparators, e.g. owner_number < 10.
I guess first query is MySQL query, right?
If field 'owner' have index in MySQL query then you could use following structure:
SELECT from results WHERE owner IN ('mike','john','tom')
I can't say too much about APP Engine, but certainly you need to use filters.

Resources