none
Microsoft.SharePoint.Library v=15 missing while programmatically adding user to SharePoint group with ADFS claim (SP2019 onPrem) RRS feed

  • Question

  • Hi All,

    I would kindly ask for your help on my issue. I am connecting to a SharePoint 2019 onPrem site via CSOM. I write my code in C#. I was able to retrieve data, therefore the connection is working.

    However, I got stuck with working with claims. I try to add programmatically an ADFS user to a permission group however, I always get a System.IO.FileNotFoundException error Could not load file or assembly 'Microsoft.SharePoint.Library, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”'or one of its dependencies.

    I could not find it in the NuGet items, I also searched through the forums and I could not get any meaningful answers. Only happening when I start woking with claims. I cannot use other methods as the code needs to identify the user based on the email address.

    I am currently working with Visual Studio 2017, but I am going to upgrade to 2019.

    Can you please advise how to obtain the mentioned component?

    Thank you!

    Best,

    Zoltan


    Zoltan Kemenes

    Saturday, October 19, 2019 8:10 AM

All replies

  • HI Zoltan,

    Could you please share your code so that we can test it.


    K Mohit

    Sunday, October 20, 2019 8:45 PM
  • Hi,

    SharePoint 2019 use version 16 libraries.

    Try to remove the old libraries reference and install from below.

    https://www.nuget.org/packages/Microsoft.SharePoint2019.CSOM/


    Best Regards,

    Lee


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    • Proposed as answer by KumarMohiT Tuesday, October 22, 2019 6:09 AM
    Monday, October 21, 2019 2:04 AM
  • Hi,

    I am checking to see how things are going there on this issue. Please let us know if you would like further assistance.

    You can mark the helpful post as answer to help other community members find the helpful information quickly.

    You can also share your own solution here and mark it as answer, so it may help others who has similar requirement.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Friday, October 25, 2019 9:18 AM