none
How can i use Directory Services in .net Core RRS feed

  • Question

  • Hi experts,

    I have to make an application using .net core with some active directory operations like Create Group , add member to group, delete user from group.

    i unable to add directory services package in .net core.

    is there any way by which i can implement the following functionalities.

    please help me.

    Thanks

    Praveen 

    Thursday, March 8, 2018 1:49 PM

All replies

  • Hi thegreatpp,

    Thank you for posting here.

    For your question, have you test you code in .net framework? Does it work well?

    >>i unable to add directory services package in .net core.

    Do you mean you could not add reference of System.DirectoryServices in Manage NuGet Package? If yes, it means .net core does not support this library.

    Is there any reason that you must use the .net core? If not, try to use .net framework.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Friday, March 9, 2018 6:18 AM
    Moderator
  • Hi Zang,

    First i would like to say thanks to reply .

    I want active directory functionality using aws lambda with c#, but lambda only support .net core .

    I am able to do the same using .net mvc but that is not working on aws lambda as it is not supported by the same .

    Is there any alternate way by which i can achieve the same functionality using c# and AWS lambda.

    Thanks

    Praveen


    Wednesday, March 14, 2018 6:11 AM
  • Hi thegreatpp,

    Sorry for that I make a mistake.

    If assembly is .net framework library, you could try to use it via adding reference for this library.

    Search your folder to find the assembly and add reference.

    Here is the System.DirectoryServices dll location in my computer for your reference.

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Thursday, March 15, 2018 8:46 AM
    Moderator
  • The reason is that, because of interoperability with other operating systems, only what can work everywhere is included into .net Core.  Since the driver that is used to provide Active Directory interaction is only installed in Windows Systems, it isn't installed in the Core library.  You have the following alternatives:

    1.  Include a library that targets LDAP instead of AD (however you will have less features there are plenty out there because LDAP is found in multiple operating systems).  Though this will provide limited capabilities, its possible that what you need may not be required in the included features.

    2.  Create a WebAPI to be hosted within a Windows Server member of the AD in question; implementing the features you need and then program a client .NET Core application like in AWS Lambda that consumes the WebAPI; this can be in any language.  Be careful to include hefty security measures; like making sure the client is being sourced from Lambda via CORS.


    Tuesday, November 12, 2019 2:38 PM