Sharepoint with AD FS ArgumentNullException

Good day!
We have three servers on Windows Server 2012R2 installed ADFS, WAP and Sharepoint 2013. On WAP published several sites Sharepoint 2013 with through preauthentication. They can be seen from the outside, it is possible for them to go. But there were one problems:
We can not configure SAML-based claims authentication with AD FS in SharePoint 2013. Configure authentication for a claims-based saml on this documentation https://technet.microsoft.com/en-us/library/hh305235.aspx?f=255&MSPPError=-2147217396, in the end
there is the following exception
Server Error in '/' Application.
Value can not be null.
Description: An unhandled exception occurred during the execution of the current web request. Examine the stack trace for more information about the error and call it code snippet.
Exception Details: System.ArgumentNullException: Value can not be null.
Source Error:
An unhandled exception occurred during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace.
Stack Trace:
[ArgumentNullException: Значение не может быть неопределенным.]
Microsoft.SharePoint.Utilities.SPUtility.FormatAccountName(String provider, String user) +196
Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, SPAppPrincipalToken appPrincipalToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous) +3655
Microsoft.SharePoint.SPWeb.InitializeSPRequest() +307
Microsoft.SharePoint.SPWeb.EnsureSPRequest() +394
Microsoft.SharePoint.WebControls.SPControl.EnsureSPWebRequest(SPWeb web) +324
Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context) +610
Microsoft.SharePoint.Utilities.SPUtility.RedirectValidateInternal(String url, SPWeb web, HttpContext context, Boolean isTrusted) +320
Microsoft.SharePoint.Utilities.SPUtility.DetermineRedirectUrl(String urlProposed, SPRedirectFlags flags, HttpContext context, SPWeb overrideWeb, String queryString, String& urlRedirect) +828
Microsoft.SharePoint.Utilities.SPUtility.Redirect(String url, SPRedirectFlags flags, HttpContext context, String queryString) +101
Microsoft.SharePoint.IdentityModel.SPFederationAuthenticationModule.OnSignedIn(EventArgs eventArgs) +663
Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.SignInWithResponseMessage(HttpRequest request) +809
Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs args) +522
Microsoft.SharePoint.IdentityModel.SPFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs eventArgs) +204
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +176
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +169
Event code: 3005
Event code: 3005
Event message: Возникло
необработанное исключение.
Event time: 27.04.2015 16:59:49
Event time (UTC): 27.04.2015 11:59:49
Event ID: 3cf0a03de8894665b1127d32672f5e8a
Event sequence: 14
Event occurrence: 4
Event detail code: 0
Application information:
    Application domain: /LM/W3SVC/973714976/ROOT-2-130746090512281500
    Trust level: Full
    Application Virtual Path: /
    Application Path: C:\inetpub\wwwroot\wss\VirtualDirectories\domen.local443\
    Machine name: SERVER
Process information:
    Process ID: 20236
    Process name: w3wp.exe
    Account name: domenАдминистратор
Exception information:
    Exception type: ArgumentNullException
    Exception message: Значение не может быть неопределенным.
   в Microsoft.SharePoint.Utilities.SPUtility.FormatAccountName(String provider, String user)
   в Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean
bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, SPAppPrincipalToken appPrincipalToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)
   в Microsoft.SharePoint.SPWeb.InitializeSPRequest()
   в Microsoft.SharePoint.SPWeb.EnsureSPRequest()
   в Microsoft.SharePoint.WebControls.SPControl.EnsureSPWebRequest(SPWeb web)
   в Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context)
   в Microsoft.SharePoint.Utilities.SPUtility.RedirectValidateInternal(String url, SPWeb web,
HttpContext context, Boolean isTrusted)
   в Microsoft.SharePoint.Utilities.SPUtility.DetermineRedirectUrl(String urlProposed, SPRedirectFlags
flags, HttpContext context, SPWeb overrideWeb, String queryString, String& urlRedirect)
   в Microsoft.SharePoint.Utilities.SPUtility.Redirect(String url, SPRedirectFlags flags, HttpContext
context, String queryString)
   в Microsoft.SharePoint.IdentityModel.SPFederationAuthenticationModule.OnSignedIn(EventArgs
eventArgs)
   в Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.SignInWithResponseMessage(HttpRequest
request)
   в Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.OnAuthenticateRequest(Object
sender, EventArgs args)
   в Microsoft.SharePoint.IdentityModel.SPFederationAuthenticationModule.OnAuthenticateRequest(Object
sender, EventArgs eventArgs)
   в System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   в System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Request information:
    Request URL: https://domen.local:443/_trust/
    Request path: /_trust/
    User host address: fe80::c0a7:b73a:afea:3972C:\inetpub\wwwroot\wss\VirtualDirectories\domen.local443\
    User: 
    Is authenticated: True
    Authentication Type: Federation
    Thread account name:DOMEN\Администратор
Thread information:
    Thread ID: 20
    Thread account name: DOMEN\Администратор
    Is impersonating: False
    Stack trace:    в Microsoft.SharePoint.Utilities.SPUtility.FormatAccountName(String
provider, String user)
   в Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean
bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, SPAppPrincipalToken appPrincipalToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)
   в Microsoft.SharePoint.SPWeb.InitializeSPRequest()
   в Microsoft.SharePoint.SPWeb.EnsureSPRequest()
   в Microsoft.SharePoint.WebControls.SPControl.EnsureSPWebRequest(SPWeb web)
   в Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context)
   в Microsoft.SharePoint.Utilities.SPUtility.RedirectValidateInternal(String url, SPWeb web,
HttpContext context, Boolean isTrusted)
   в Microsoft.SharePoint.Utilities.SPUtility.DetermineRedirectUrl(String urlProposed, SPRedirectFlags
flags, HttpContext context, SPWeb overrideWeb, String queryString, String& urlRedirect)
   в Microsoft.SharePoint.Utilities.SPUtility.Redirect(String url, SPRedirectFlags flags, HttpContext
context, String queryString)
   в Microsoft.SharePoint.IdentityModel.SPFederationAuthenticationModule.OnSignedIn(EventArgs
eventArgs)
   в Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.SignInWithResponseMessage(HttpRequest
request)
   в Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.OnAuthenticateRequest(Object
sender, EventArgs args)
   в Microsoft.SharePoint.IdentityModel.SPFederationAuthenticationModule.OnAuthenticateRequest(Object
sender, EventArgs eventArgs)
   в System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   в System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Custom event details:
Below is the log from the server Sharepoint
login attempts after him through AD FS
[Forced due to logging gap, cached @ 04/23/2015 14:15:33.24,
Original Level: Verbose] SQL connection time: 0.0931 for Data Source=sharepoint2013;Initial 
Catalog=SharePoint_Config1;Integrated Security=True;Enlist=False;Pooling=True;Min
Pool Size=0;Max Pool Size=100;Connect Timeout=15;Application 
Name=SharePoint[w3wp][4][SharePoint_Config1]
c67bff9c-d04d-7016-86c3-95382b2ada70
04/23/2015 14:15:33.30 
w3wp.exe (0x32CC)          
            0x3E3C
SharePoint Foundation         
Topology            
umbj
 High 
 [Forced due to logging gap, Original Level:
Verbose] Deserializing the type named {0} and with id {1}.
c67bff9c-d04d-7016-86c3-95382b2ada70
04/23/2015 14:15:33.35 
w3wp.exe (0x32CC)          
            0x3E3C
SharePoint Foundation         
Claims Authentication         
f2us
Verbose Claims
Saml Sign-In: Redirecting to 'https://adfs.domain.ru/adfs/ls?wa=wsignin1.0&wtrealm=urn%3asharepoint%3aportal.domain.ru&wctx=https%3a
%2f%2fportal.domain.ru%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F'
to authenticate for request 'https://portal.domain.ru/_trust/default.aspx?
trust=ADFS30&ReturnUrl=/_layouts/15/Authenticate.aspx?Source=%252F&Source=/'.
c67bff9c-d04d-7016-86c3-95382b2ada70
04/23/2015 14:15:33.35 
w3wp.exe (0x32CC)          
            0x3E3C
SharePoint Foundation         
Micro Trace            
      uls4
Medium  
 Micro Trace Tags: 0 nasq,1 agb9s
c67bff9c-d04d-7016-86c3-95382b2ada70
04/23/2015 14:15:33.35 
w3wp.exe (0x32CC)          
            0x3E3C
SharePoint Foundation         
Monitoring            
b4ly

I know this is an old thread and the question was specifically for Windows Server 2008 R2, but I wanted to let folks know that we've published a new set of step-by-step instructions for AD RMS with AD FS on Windows Server 2012 R2.
We also ran into a lot of problems when trying to get this working and one of the things that we specifically included in this new document, was checkpoint verification tests - both "just in time" and repeated in a summary section with tips
for what to check if the tests fail.  Hopefully, with these checkpoints, you can narrow down the problem or at least eliminate what isn't a problem. And when we ran into odd, quirky things ourselves (such as case-sensitivity for some values, or the importance
of a trailing "/"), we included these in the document as well. If you have any other tips, consider adding them as a Community Addition at the bottom of the page to help other people.
Deploying Active Directory Rights Management Services with Active Directory Federation Services

Similar Messages

  • Grading SCORM content on SharePoint with SLK (SharePoint Learning Kit)

    Hi everyone,
    My name is Kevin and I am currently working in a company to develop E-Learning materials to help train new hires. I am using Articulate Storyline to make quiz content and uploading the content to SharePoint with the SharePoint Learning Kit SLK. Here is some
    information that you can follow and hopefully help me with configuring SLK to grade my Articulate quizzes.
    First, I want to outline the progress I have currently made so that anybody can see if the problems I have are due to things I already did:
    Used Articulate Storyline to make Presentations with Quiz questions in them that are graded and reviewed at the end of the Presentation
    Published the Storylines to LMS in SCORM 2004 format and saved to my computer
    Took each published Storyline and made .zip files
    Uploaded .zip files to SharePoint 2010 with SLK (SharePoint Learning Kit). Can assign Learners with .zip files as long as they download them, extract them, and find the ‘story.swf’ flash file that runs the Presentation so they can go through the Storylines,
    answer quiz questions, and receive a quiz grade at the end of them
    The issue is that after downloading each .zip file, running the Presentation, and finishing the Quiz questions at the end of them, the information cannot be stored or saved and re-submitted to SLK which should then automatically read the Quiz progress and
    log in a grade as well as log in completion of the assignment due to passing grades.
    The questions at hand are:
    How to save or store graded information from the Presentations so that they can be submitted to SLK?
    How to make sure SLK takes in the graded information submitted from the Presentations automatically, store it, and reveal them?
    How to make sure SLK determines assignment completion and passing assignments grade-wise?
    I watched videos of how SLK grades the quiz content and I think that will work, but I think my main issue is saving that quiz content and getting to submit to SLK for grading.
    Thank you for reading about my issue and any help would be greatly appreciated. If I think of other questions, I’ll let you know and if you have questions for me, feel free to ask.
    Sincerely,
    Kevin Bansleben

    Hi kbans,
    Thanks for your sharing!
    Wendy
    Wendy Li
    TechNet Community Support

  • Combining SharePoint with Lync UCWA

    Hi everyone,
    i have successfully built a little Lync UCWA application with JavaScript that shows the user and his profile and is running in our SharePoint.
    Everything works fine, but what doesn't work as expected is the single sign on. I have to put in my credentials two times:
    Once for the SharePoint and once for the Lync Login. Also some Users cannot log in at all.
    We also have the normal Lync client running in the background with also the same credentials which works fine with presence and other features. Showing the presence like in lists is also possible and working.
    I have already asked this question in the Lync-Forums and was redirected to this one.
    Thanks in advance,

    Hi,
    According to your description, my understanding is that you want to combine the SharePoint with lync UCWA application without repeating to enter credentials if you have configured single sign on.
    As you are using UCWA Web API to get lync data , it always need the authentication firstly to get access to the data, so it needs to enter credentials. And if you are call data cross domain, it can't be used single sign on as the UCWA will need credential.
    Would you please share some code, then it can help us to figure out what you are using.
    Here are some detailed articles for your reference:
    Authentication in UCWA
    UCWA by the numbers – #2 Authentication
    Best Regards,
    Jerry Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Connect to MS Sharepoint with builtin Tools

    Dear Community,
    At work we are using Exchange and Sharepoint. I was able to connect my MBP with 10.8 to the Exchange, no problem at all. That's cool.
    Now I would also like to start using Sharepoint with OS X builtin tools. What I especially crave is using Sharepoint-Tasks with Reminders.app.
    Is there any way to achieve this? Or how can I copy Sharepoint tasks into Exchange, because the Exchange Tasks work flawlessly with Reminders.app.
    Thanks for your help
    simon

    Hi,
    mysql is free and infinitely a better database than Access. Try this and enjoy.
    best,
    kev
    ps I only use Access for very simple testing before either moving to mysql (my fave rave) or DB2. In fact that's a lie, I don't even test on Access unless I have to.

  • Sharepoint with Autocad,ESRI GIS and Primavera files.

    Hi All,
    I need to integrate SharePoint with ESRI GIS, AutoCAD,Primavera files  and
    support external storage repositories to store files larger than 1 GB such as ESRI GIS, AutoCAD and Primavera files. can some one help me!!!

    Hello,
    You should ask on the
    SharePoint forums.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • Integrate Microsoft sharepoint with BW

    Dear experts:
       I'd like to integrate Microsoft sharepoint with BW directly, could you provide me some documents about it , thanks.
    Eric

    Hi Eric,
    additional check this links:
    [SQL Serveru2019s Business Intelligence (BI) capabilities|http://download.microsoft.com/download/E/D/F/EDF235B0-3FFD-468D-BD29-2F33ADB4BC0C/SQL_SAPBW_Datasheet.pdf]
    [SAP BI for SharePoint Portals|https://portal.erp-link.com/sites/erpl_solutions/Solutions/Solutions%20library/iNetBIViewer.aspx]
    WebPart: iNet.BI Viewer, an add-on component for ERP-Linku2019s iNet.BI, presents SAP information and actionable business intelligence to knowledge workers within interactive, graphical views in SharePoint portals.
    Search for "[WSRP|http://www.cmswire.com/cms/portal/microsoft-releases-sharepoint-web-parts-for-sap-and-web-services-integration-000403.php] Web Part Toolkit for Sharepoint Products and Technologies for SAP iViews" to integarte Netweaver-iViews.
    [Microsoft Business Intelligence on SAP NetWeaver data|http://download.microsoft.com/download/3/3/9/339550a1-c0f7-4299-adbf-67ca0e8a413e/SAP%20MS%20BI.pdf]
    Regards
    Andreas

  • Mounting external SharePoint with OSX Server

    Hi,
    I know that the default location for a mounted SharePoint is the /Volumes directory. Is there a way, some command line command, to mount a SharePoint at a different location, say, at root?
    Would there be security implications for allowing the www user (Apache) dr-x access to a SharePoint mounted at root?
    Thanks,
    Ted

    Thanks, Brent. I used the mount_afp command successfully to create a mounted SharePoint within the Webserver Documents directory.
    But! When, using a browser, I try to access a webpage that's saved within the SharePoint's file system, one of the Xservers (web server or the other Xserve, an X Raid host) tells me that "I" (the www user) doesn't have "permission to access the file on this server."
    We don't have Open Directory set up right now, so the www user is local to the Xserve that's the web server. Do I need to come up with a way to authenticate the web server's' "www user" on the X Raid host?
    Thanks for your thoughts,
    Ted

  • Bulk insert files into sharepoint with metadata

    Hello everyone,
    I am creating an application which will migrate  about 16k documents and their metadata from a legacy system to SharePoint.
    I got the extract of the legacy system in a way that I have a folder containing the document (pdf file) and an xml file with the metadata per document.
    I created the whole thing to be able to do the upload and it works fine, but on the other hand it is damned too slow...
    I splited the operations, first I upload all the files and then I update the metadata of the files. I also splited the files in batches of 1000 items.
    The file uploading takes more time as the list is filled. At the beginning I needed 15 mins for 1000 files, now that the list has already 3000 files in there, it takes about an hour...
    I do check if the file already exists before uploading it because I need to report an error if the file was already in the list (duplicates detection)
    Is there anyway to improve the performance of the system?
    I also have another issue which is the fact my tool to migrate the files is taking more RAM as the list grows. After the 5000th file my tool is using over 1GB of RAM. Could it be because I use a single SPSite instance for the whole upload? Should I recreate
    it during the upload?
    Here is the code I use in order to upload the files:
    using (var web = _currentSite.OpenWeb())
    var library = web.GetList(libraryName);
    var relativeFileUrl = string.Format("{0}/{1}", library.RootFolder, fileName);
    if (web.GetFile(relativeFileUrl).Exists)
    throw new InvalidOperationException(string.Format("The file '{0}' already exists", fileName));
    var file = web.Files.Add(relativeFileUrl, fileStream, false);
    Thanks a lot for your help!
    With kind regards
    Carlos

    Hi,
    So after a lot of digging the logs and so on, my application was not responsible of the lag on the upload.
    Basically the list I was uploading to was using an event receiver which had a memory leak and was not using the most performant methods in order to retrieve data etc...
    The lags came from the event receiver. Shame is I was the one who developped the event receiver hahaha :)
    Anyway, once the event receiver was fixed, I got much better results for the upload and an upload speed of about 600 files per 10 mins which is totally acceptable for me!
    I also learned in the way the two following facts that might interest people in this situation:
    Event receiver code is loaded in the context of the console application process doing updates to the list. I thought at first the event receiver would be called in a RPC fashion and would live in the web application process. My mistake :)
    My event receiver is responding to the ItemAdded and ItemUpdated events which are assynchronous. Once the console application ends its processing, it shuts down all the threads created by the event receiver even if they did not ended their work!
    As there is no way to check if the event receiver ran or not in the code, and after searching on the web for a couple of hours, the only way to solve this is to put a Thread.Sleep at the end of the console application in order to let the event receiver thread
    pool threads finish their work and avoid killing them.
    Normally the wait time should not be too long except if the event receiver is really doing an heavy job or suffers of a huge memory leak (sounds familiar... :p)
    Hope this will help others solving their issues.

  • Public-facing on-premises SharePoint with NTLM authentication

    I've been searching for authentication best practices for public-facing SharePoint site but I didn't find any useful resources on the issue that is troubling me.
    Assume I set up a web application with Classic NTLM authentication. On that web application I enable
    Anonymous access. This means that users inside organization's network will be able to authenticate (actually use SSO) using organization's DC. They will be able to access and administer all content. All other anonymous users will be able to see
    published content only i.e. content which is permitted to anonymous users.
    My question is: Is this kind of setup a security issue because if a potential attacker hacks a WFE then he has direct access to DC?
    Is FBA maybe a better solution for public-facing sites? Or maybe use NTLM, but create a separate domain with one-way trust to organization's domain?

    There are many variations you can take with this - and really you need to consider more than just your content. For true separation:
    I would have a dedicated DC to manage service accounts.
    I would break up my DMZ behind firewall contexts with a reverse proxy publishing SharePoint at the edge.
    proxy/firewall -- SP Server -- Firewall -- SQL/DC
    For true separation you don't want to share any underlying infrastructure with internal either, although in reality logical separation is usually enough.
    Now you have to deal with internal user authentication and how to handle that. The first thing is I would have at minimum two webs available, your primary for editing and the extended version for public access.
    While a one way trust would work - you still do expose user info out to the public which you may not want. With this configuration you could configure people picker to only select from a particular OU to minimize this.
    Another option however is to look at using ADFS between your domains and create the trust there. You would have to configure the farm for claims auth to make this work, but this would eliminate the possibility of probing all the users in AD or the OU you expose.
    With the ADFS method when you update documents you user name is still tagged to content - however if you don't populate the user profiles this will be the only information available about any internal user.
    You may even want to go a step further and when you extend the public site, use forms authentication but don't provide any users. Then there is no authenticated access from the public URL. And with ADFS/Reverse Proxy may you even be able to configure some pre
    authentication for your internal users before they can even reach the internal SharePoint pages.
    I would strongly consider moving to SharePoint 2013 and looking at the cross site publishing (2010 and below have the content publishing - but stay away from that, when it works it's great, but when it doesn't it's a PITA to get back in sync). with cross site
    publishing you have an editing site and the publishing site pulls from the Search index and the permissions are completely separate.

  • SharePoint with OneDrive for Business

    Hi, I'm looking for some clarification on how OneDrive works with SharePoint. The person who set up SharePoint is no longer with the company and we do not have expertise on this subject.
    We have three SharePoint 2013 servers - a database server, a web server, and a Web Apps server.
    OneDrive for Business integration works fine. However, I am now trying to upload some 20+ GB at a time but keep getting the error "there is not enough space on SharePoint. You need an additional x GB to copy these files".
    I've checked all the servers and I have sufficient free space on them - storage is presented to vSphere from the SAN.
    My question is: how exactly does the data get to its final destination on the database server? Does it go through a C: drive on one of those servers and that's why I'm getting the error message? Is there a specific service I can check to see if it's running
    to pinpoint the location of the OneDrive integration?
    Thanks in advance.

    Did you check for quotas on the MySite Site Collection? By default, I believe it is 100MB. Also, no one file can be greater than 2GB. This is a SharePoint limit.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Active Directory SSO Sharepoint with External sources

    I hope someone can advise me.  We use Active Directory (AD FS 2.0 SAML) for authorization/authentication for SSO.  Our new library platform that is hosted by a 3rd party complies with CAS 3 (SAML is only supported with CAS 4) they have no plans
    to update to CAS 4 anytime soon.
    How can I achieve a SSO solution from our SharePoint for users to have seamless access to their respective libraries using the attributes in AD??

    where did you see this error ? is there anymore details.
    i think the account you are using for Sync does not have Replicate Directory Changes permission in AD. follow below article and give Replicate directory changes permission.
    http://technet.microsoft.com/en-us/library/hh296982(v=office.15).aspx
    Thanks, Noddy

  • Access denied. When trying to upload files into SharePoint with PowerShell

    AM trying to upload a bunch of files into SharePoint using PowerShell. I have a code that works on my local machine, but when I get on the server, it does not. Here is what my block of code looks like
    $webUrl = "http://SampleSite"
    $libraryName = "My Lib"
    $docLibraryUrlName = "My%20ContentType"
    $fileLocation = "C:\test\"
    $contentType = "My ContentType"
    #Open web and library
    $web = Get-SPWeb $webUrl
    $docLibrary = $web.Lists[$libraryName]
    $files = ([System.IO.DirectoryInfo] (Get-Item $fileLocation)).GetFiles()
    ForEach($file in $files)
    #Open file
    $fileStream = ([System.IO.FileInfo] (Get-Item $file.FullName)).OpenRead()
    # Gather the file name
    $FileName = $File.Name
    #remove file extension
    $NewName = [IO.Path]::GetFileNameWithoutExtension($FileName)
    #split the file name by the "-" character
    $FileNameArray = $NewName.split("_")
    #Add file
    #$folder = $web.getfolder($docLibraryUrlName)
    $folder = $web.getfolder($docLibrary)
    write-host "Copying file " $file.Name " to " $folder.ServerRelativeUrl "..."
    $spFile = $folder.Files.Add($folder.Url + "/" + $File.Name, $fileStream, $true)
    $spItem = $spFile.Item
    #populate metadata
    $spItem["First Column"] = $FileNameArray[0]
    $spItem["Second Column"] = $FileNameArray[1]
    $spItem.Update()
    $fileStream.Close();
    Again, this code works fine on my local machine but doesn't when I move this to the server. When I step through the code, I noticed that when I look at the data returned for my $folder variable in this snippet
    $folder = $web.getfolder($docLibrary)
    It shows the EffectiveRawPermissions to be "Open, BrowseUserInfo, UserClientIntegration" on the server...however, the EffectiveRawPermissions on my local machine is "FullMask". Does this have any effect on the ability of my code to be
    able to upload the files into SP on the server? I have never run into this issue, so am not sure how this makes sense...so I really appreciate any insight. Thanks
    I am getting this error when the code attempts to perform the "Add" function...
    Exception calling "Add" with "3" argument(s): "<nativehr>0x80070005</nativehr><nativestack></nativestack>Access denied."
    At C:\PowerShellScripts\tester.ps1:70 char:3
    +         $spFile = $folder.Files.Add($folder.Url + "/" + $File.Name, $fileStream, $true ...
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : UnauthorizedAccessException
     ...Please help

    RunWithElevatedPriv basically impersonates the webapp's app pool account, which should have full control over the entire webapp... this would work, but is not recommended for several reasons:
    - first and foremost, you shouldn't NEED to bypass the SP security model
    - second and still important, the app pool may be hosting other webapps as well, so the risk of a bug causing security-related problems within the RunWithElev codeblock is no longer scoped to the current webapp, but also other webapps that share the same
    app pool account.
    - third, same as number two, but for service accounts, and possibly even the farm... not a good practice, but a lot of SP installs aren't configured correctly, so the entire farm may be using one account... now, the RunWithElev is not just a webapp admin,
    not just a multiple webapp admin, but may be able to affect service apps, or possibly the entire farm.
    - fourth, the audit info (created by, modified by) will reference the system account, instead of your account... not a very accurate audit trail in that case.
    If you have a legit need to add the files, you should be able to get the necessary permissions (which is basically just contribute within the library / folder) easily enough.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • How to troubleshoot sharepoint with Issues when connecting to SSIS

    I am trying to insert into a sharepoint list with SSIS and am getting an error which is to vague. I am trying to troubleshoot but just don't know enough about sharepoint. I have looked at the log files but there isn't anything there.
    There are also a tonne of options under logging configuration....how would I trouble shoot permission errors, updating/inserting errors through logs or see what messages the connections are generating?
    From SSIS side all I see is:
    [SharePoint List Destination] Error: Error on row ID="1": 0x80070005 - Unspecified Error - Check SharePoint Server Logs if possible.
    [SharePoint List Destination [131]] Error: Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.PipelineProcessException: Errors detected in this component - see SSIS Errors
       at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListDestination.ProcessInput(Int32 inputID, PipelineBuffer buffer)
       at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "SharePoint List Destination" (131) failed with error code 0x80131500 while processing input "Component Input" (141). The identified
    component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the
    failure.
    Any direction would be very very appreciated.

    Hi Caseypruden,
    I think you are using the SharePoint List Destination adapter downloaded from CodePlex, right? From the following links, you should be able to see permissions related error in the SharePoint Log file:
    http://sqlsrvintegrationsrv.codeplex.com/workitem/16301
    https://sqlsrvintegrationsrv.codeplex.com/discussions/279849
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f38d1d14-bf33-4d6d-83c4-2daf0da14697/sharepoint-list-destination-fails-on-a-job-but-manually-and-in-power-shell-runs-fine?forum=sqlintegrationservices
    If you are running the package in BIDS/SSDT, make sure the current Windows user has sufficient permission the SharePoint site to edit the SharePoint list. If you are running the package as a SQL Server Agent Job, make sure the SQL Server Agent Service Account
    or the proxy account has the corresponding permission on the SharePoint site.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to move offline files to sharepoint with same version history

    Hi,
    We have downloaded some of the file from sharepoint in our computer, now we have migrated the site to 2013 from 2010.
    Can we upload the offline files to new site with version history maintained.
    tks,
    vidhu

    I am not sure you can do this OOTB, either you need custom development or 3rd party tools.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Error synchronizing Sharepoint with Outlook

     
    I try to connect one document library in Outlook.
    The configuration connection, work fine, I see in Outlook (under SharePoint list in Outlook) the correct folder (named as Document library) but:
    Don't see the documents and the outlook synchronization process returned the following error:
    Task 'SharePoint' reported error (0x80004005) : 'An error occurred in this SharePoint List (myserver - DocLibraryName). Try updating the folder again. If the problem continues, contact the SharePoint
    site administrator.  HTTP 500. The server returned the following error message: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.'
    any suggestions?
    installation detail SharePoint Foundation  2013 (15.0.4481.1005) with SQL Server® 2012 Express

    HI,the issue could be of many reasons like the list is corrupted or not connected well.please check the link below that explains the same issues with details of solutions.
    http://expertsharepoint.blogspot.de/2014/05/task-sharepoint-reported-error.html
    Anil Avula[Partner,MCP,MCSE,MCSA,MCTS,MCITP,MCSM] See Me At: http://expertsharepoint.blogspot.de/

Maybe you are looking for