Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6384879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:49:47+00:00 2026-05-25T02:49:47+00:00

I am trying to read all the user attributes in AD. How to read

  • 0

I am trying to read all the user attributes in AD.

How to read msExchMailboxSecurityDescriptor attribute in C# ?

I used the following code but I got a cast error. Any suggestions would be welcome.

  DirectoryObjectSecurity oSec = new ActiveDirectorySecurity();
  oSec.SetSecurityDescriptorBinaryForm((byte[])val);

  String m_Value = oSec.GetSecurityDescriptorSddlForm(AccessControlSections.All); 
  return m_Value; 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:49:48+00:00Added an answer on May 25, 2026 at 2:49 am

    Ok. I was able to figure it out. The code is given below for anyone interested. I wish Microsoft had put out some code samples so that people do not have to break their heads.

         SecurityDescriptor sd = (SecurityDescriptor) p_InputValue;
               AccessControlList acl = (AccessControlList)sd.DiscretionaryAcl;
                  String m_Trustee = "";
                  String m_AccessMask = "";
                  String m_AceType = "";
                  String m_ReturnValue="";
    
                      foreach (AccessControlEntry ace in (IEnumerable)acl)
                        {
                          m_Trustee = m_Trustee + "," + ace.Trustee;
                         m_AccessMask = m_AccessMask + "," + ace.AccessMask.ToString();
                          m_AceType = m_AceType + "," +ace.AceType.ToString();
    
                         }
             m_ReturnValue="Trustee: " + m_Trustee + " " + "AccessMask: " + m_AccessMask + "AceType: " + m_AceType;
             return m_ReturnValue
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read all the other user's accounts of problems, but they don't seem
I am trying to read user input with multiple fields. But the number of
I am trying to setup a central repository with shared hosting. I read all
I'm trying to read the event log for a security audit for all users
Trying to read an RSS and select information using Linq but can't seem to
I am trying to read an Http response stream twice via the following: HttpWebResponse
I'm trying to read the targets of all desktop shortcuts in a C# 4
I'm new to MVC, but I've been all over this, read all the documentation
hello i'm trying to use core data to read and write user data. the
I am trying to read a user's stream using the facebook graph api. the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.