Shibboleth retrieves a "non-existent" attribute from Active Directory(urn:oid:2.16.840.1.113730.3.1.3) - active-directory

I have a SP using Shibboleth as IDP for SSO, and Shibboleth uses Active Directory as User store.
In SP configuration, it maps an attribute "urn:oid:2.16.840.1.113730.3.1.3" to a local attribute.
I exported all objects from AD but didn't find any attributes associated with 2.16.840.1.113730.3.1.3. But when I check SAML log in SP, I did find values of "EmployeeID" from AD are filled into this attribute, but AD attribute "EmployeeID" has different AttributeID(1.2.840.113556.1.4.35).
I used the following 2 cmds to export AD schema objects, neither of them shows 2.16.840.1.113730.3.1.3:
$schemaPath = (Get-ADRootDSE).schemaNamingContext
Get-ADObject -filter * -SearchBase $schemaPath -Properties *|select-object lDAPDisplayName,attributeID
ldifde -f xxx.ldif cn=Schema,CN=Configuration,DC=xxxx,DC=xxxx,DC=edu
Anybody knows why 2.16.840.1.113730.3.1.3 doesn't show up in schema query but Shibboleth can query its values?
Thank you

Related

Azure AD graph API to Search multiple users based on UserPrincipalName and Mail

Is there a way in Graph API where advance query able to search group of users based on Email id and User Principal Name.
We are using filter parameter with "in" clause to search users
https://graph.microsoft.com:443/v1.0/users?$count=true&$filter=userPrincipalName in ('abc#xyz.com','pqr#xyz.com','guest#external#xyz.com)
Above URL works charm. But we see Mail instead of userPrincipalName, we are decided to query based on Mail or UserPrincipalName property. Is there any support for graph api to search against Mail and UPN property in single call. I tried with signInNames or otherMails or issuerAssignedId but they are not supported. Any better way for querying both UPN and Mail
• You can use the ‘OR’ in advanced query filter parameter to search for multiple users’ based on ‘UPN’ and ‘mail’ in a single query call as below: -
‘ https://graph.microsoft.com/v1.0/users?$count=true&$filter=mail in ('lobo#def.com') or userPrincipalName in ('abc#xyz.com') ‘
The above query will give the details of the users based on UPN as well as mail attribute and fetch the same data from Azure AD related to the users. It will fetch all the general information that is available in Azure AD.
Please find the below link for more details on using the OR operator: -
https://learn.microsoft.com/en-us/graph/query-parameters#filter-parameter

How to Get Azure AD Object by Object ID Using Azure CLI

In the Azure Portal, one can look-up an Azure AD object based on the Object ID as shown below:
Is it possible to retrieve an Azure AD object by the Object ID using the Azure CLI?
In order to use the Azure CLI to get the object related to the object ID, it appears that I need to know in advance if the related resource is a user, group, device, app registration, etc., in order to get the details. For example, if I know the Object ID is a user, I can use az ad user show --id. If all I have is the Object ID, I don't know the 'type' of the object, yet somehow the Portal can figure this out!
While I'd prefer an Azure CLI solution, an Azure PowerShell solution would be better than nothing. I am asking the question because I'm trying to generate a list of access policies within key vault using az keyvault list, but the access policy list from that CLI command just shows Object IDs for each policy... I have no way of determining if the objects are users, groups, etc.
If you want to get Azure AD resource with its object id, we can use the following Microsoft Graph API
POST https://graph.microsoft.com/v1.0/directoryObjects/getByIds
Content-type: application/json
{
"ids":[""]
}
If you want to call the Microsoft Graph with Azure CLI, we can use the command az rest
For example (I use Azure cloud shell)
az rest --method POST --url 'https://graph.microsoft.com/v1.0/directoryObjects/getByIds' --headers 'Content-Type=application/json' --body '{"ids":[""]}'
For more details, please refer to here nad here
If you have a CSV file with user IDs in one column, this script is useful to look up all users at once
param(
$file = "query_data.csv"
)
$data = Get-Content $file | ConvertFrom-Csv
$userIds = $data.User | Get-Unique
$body = #{
ids = $userIds
} | ConvertTo-Json -Compress;
$body = $body -replace '"', '\"';
$results = az rest `
--method POST `
--url 'https://graph.microsoft.com/v1.0/directoryObjects/getByIds' `
--headers 'Content-Type=application/json' `
--body $body;
$results > results.json

Microsoft Graph API Initials attribute

Hey I would like to retrieve the Initials of a user in the graph explorer. I synchronized thies field with AD Connect zu Azure AD but in the documentation i dont see any property like that: https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0
I know the attribute is on Azure AD but how can i retrieve it with the Graph API?
Thanks & best regards
In the AAD, it doesn't define this property Initials, it is a user's attribute in AD not in AAD.
In AD, you could use powershell to get a user's Initials by this:
Get-ADUser "YourUser" -Properties Initials
In MS graph exploerer, I tried Get Https://https://graph.microsoft.com/v1.0/users?$select=Initials for all the user (included synced users from AD), and then the return value is null for all the user.
The return:

openLDAP: login with userPrincipalName

I have set up an openLdap server instance.
Login for the time being requires providing as username the user's dn, e.g.
"cn=151test,cn=somecn,ou=someou,dc=mydomain,dc=com"
How is it possible to enable login with userPrincipalName in the form of
151test#mydomain.com ?
edit: it seems that userPrincipalName is an attribute of user objectClass, available to Active Directory but not available out of the box to the default schema used by openLDAP.
So the question more or less becomes:
how to use (import) an AD-compliant schema by (to) openLDAP AND enable login with userPrincipalName as username
As far as I know using just the attribute value of userPrincipalName in a simple bind request only works for Microsoft-ActiveDirectory.
Other LDAP servers need the full-DN or a short DN if they are capable of bind-DN rewriting, like OpenLDAP's slapd with slapo-rwm.

UnboundID LDAP: memberOf filter not synchronising users

Apologies for the newbie question, fairly new to LDAP and UnboundID.
I currently have an UnboundID filter that synchronises users who belong to an Active Directory group.
--set include-base-dn:cn=Users,dc=testdomain,dc=net --add "include-filter:(memberOf=CN=Application Access,CN=Users,DC=testdomain,DC=net)
The behaviour I am seeing is that when I add a user to the group "Application Access", no Synchronisation occurs.
However if I edit the users AD profile whilst they are a memberOf "Application Access" then the user profile is synchronised.
Is is possible to synchronise users when they join a group?
Thanks in advance.
In Microsoft Active Directory the MemberOf value is the DN of an entry that the current entry is a member in a Group and is referred to as a Forward Reference.
A Pseudo Attribute Microsoft Active Directory
MemberOf is a Pseudo Attribute. This implies You can not monitor the MemberOf attribute for changes (Like with DirXML)
Within Microsoft Active Directory MemberOf is flagged as "NO-USER-MODIFICATION" (or System-Only)[1]; This means you can NOT update the attribute. In order to add a user to a group you have to write the user's dn to the member attribute on the group object.
-jim

Resources