Quantcast
Channel: LDAP/AD Claims Provider For SharePoint
Viewing all articles
Browse latest Browse all 270

New Post: How to keep admin pages while customizing ldapcp?

$
0
0
Thank you for your answer. In fact I just need to make the people picker displays the 'User display name'.

Could you be kind enough to show me how to modify the custom code following (downloaded from this site) to achieve this?
        protected override void SetCustomConfiguration(Uri context, string[] entityTypes)
        {
            //base.SetCustomConfiguration( context, entityTypes);

            this.CurrentConfiguration.FilterEnabledUsersOnlyProp = true;
            this.CurrentConfiguration.FilterSecurityGroupsOnlyProp = true;
            this.CurrentConfiguration.FilterExactMatchOnlyProp = false;

            // If input is resolved by an attribute linked to identity claim type (typically displayName and cn attributes), show its value in parenthesis.
            this.CurrentConfiguration.DisplayLdapMatchForIdentityClaimTypeProp = false;

            // By default LDAPCP matches LDAP attributes with claim types as documented in homepage of project
            // But you can customize this mapping to match claim types defined in (Get-SPTrustedIdentityTokenIssuer).ClaimTypeInformation
            this.CurrentConfiguration.AttributesListProp = new List<AttributeHelper>
            {
                new AttributeHelper{LDAPAttribute="mail", LDAPObjectClassProp="user", ClaimType=WIF.ClaimTypes.Email, ClaimEntityType = SPClaimEntityTypes.User, EntityDataKey=PeopleEditorEntityDataKeys.Email,LDAPAttributeToDisplayProp="DisplayName"},
                new AttributeHelper{LDAPAttribute="sAMAccountName", LDAPObjectClassProp="user", ClaimType=WIF.ClaimTypes.WindowsAccountName, ClaimEntityType = SPClaimEntityTypes.User, AdditionalLDAPFilterProp="(!(objectClass=computer))",LDAPAttributeToDisplayProp="DisplayName"},
                new AttributeHelper{LDAPAttribute="userPrincipalName", LDAPObjectClassProp="user", ClaimType=WIF.ClaimTypes.Upn, ClaimEntityType = SPClaimEntityTypes.User,LDAPAttributeToDisplayProp="DisplayName"},
                new AttributeHelper{LDAPAttribute="sAMAccountName", LDAPObjectClassProp="group", ClaimType=WIF.ClaimTypes.Role, ClaimEntityType = SPClaimEntityTypes.FormsRole,LDAPAttributeToDisplayProp="DisplayName"},

                // Items below (CreateAsIdentityClaim=true) will always be queried and permission will be created using identity claim type
                // This allows to search user on common attributes such as the firstname / lastname / displayname, etc...
                new AttributeHelper{LDAPAttribute="displayName", LDAPObjectClassProp="user", CreateAsIdentityClaim=true, EntityDataKey=PeopleEditorEntityDataKeys.DisplayName,LDAPAttributeToDisplayProp="DisplayName"},
                new AttributeHelper{LDAPAttribute="cn", LDAPObjectClassProp="user", CreateAsIdentityClaim=true, AdditionalLDAPFilterProp="(!(objectClass=computer))",LDAPAttributeToDisplayProp="DisplayName"},
                new AttributeHelper{LDAPAttribute="sn", LDAPObjectClassProp="user", CreateAsIdentityClaim=true,LDAPAttributeToDisplayProp="DisplayName"},

                // items below don't have a claim type or CreateAsIdentityClaim set, so they do not participate in LDAP query, but they are retrieved (if they exist) to populate metadata (PeopleEditorEntityDataKeys) of the permission (PickerEntity)
                new AttributeHelper{LDAPAttribute="department", LDAPObjectClassProp="user", EntityDataKey=PeopleEditorEntityDataKeys.Department,LDAPAttributeToDisplayProp="DisplayName"},
                new AttributeHelper{LDAPAttribute="title", LDAPObjectClassProp="user", EntityDataKey=PeopleEditorEntityDataKeys.JobTitle,LDAPAttributeToDisplayProp="DisplayName"},
            };
        }

Viewing all articles
Browse latest Browse all 270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>