47 thoughts on “Bulk update SharePoint User Profiles in Office 365

  1. we don’t have AD synch with office 365 and we would like to update Manager properties for all the users in sharepoint online. I was run the tool to update manager value but got error. please help on this.

    1. Can you please be a little bit more specific what error you got? To update the manager attribute please make sure that you have the property formatted correct.
      You should specify the full claim user name. For example:
      i:0#.f|membership|stefan.bauer@myoffice365.com

      The first part specifies the claim that should be used while the second part is the Account Name.

  2. Hi, Thanks for the userful article. I downloaded the tool buts it giving me acception after successfully authenticating
    Unhandled Exception: System.Web.Services.Protocols.SoapException: Server was una
    ble to process request. —> Object reference not set to an instance of an objec
    t.
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClie
    ntMessage message, WebResponse response, Stream responseStream, Boolean asyncCal
    l)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN
    ame, Object[] parameters)
    at n8d.UserProfileBulkImport.UserProfileWS.UserProfileService.GetUserProperty
    ByAccountName(String accountName, String propertyName)
    at n8d.UserProfileBulkImport.UserProfileUpdater.Update()
    at n8d.UserProfileBulkImport.Program.Main(String[] args)

  3. Thanks Stefan, it is working now. I was using wrong separator in import file instead of tab.

    It’s a nice little tool. Appreciate you putting it up on internet.

  4. Thanks for this Stefan.

    I’m afraid I’m just a site administrator and I have no background in MS programming so please excuse the newbe question.

    What are the prerequisites for running the tool? It is not finding the Microsoft.Sharepoint.Client.runtime. I have placed a copy of the DLL in the source directory but no luck.

    1. Hi Steve,

      you can download a copy of the client components SharePoint Server 2013 Client Components SDK
      . After you downloaded and installed this you should be able to get this work. If you look for the Assembly please navigate to the “your windows folder\assembly\”. This is the so called global assembly cache where all the global dll are stored. You should then see in the list of assemblies the Microsoft.SharePoint.Client.runtime there. Hope this helps if not I will check it directly in one of my VMs.

      /Stefan

  5. Thanks Stefan. That did the trick. Process worked as advertised. It takes some time for the changes to get sync’d out in the sharepoint.com world. but now that is done the changed data is in place.

    Great to have a good sample as starting point for our process. It looks like the O365 – sharepoint.com sync is seriously limited so having a fallback keeps our project from going off the rails.

    Thanks again

    1. Stefan, I am not a developer but I am trying to accomplish many of the same things folks have listed here. I am trying to use your tool but when I enter my password I get an error that states: “The partner returned a bad sign-in name or password error. For more information, see Federation Error-handling Scenarios.” I am a site collection administrator. I even changed my password and allowed the weekend for everything to sync. We are using ADFS but I changed my passwords with Microsoft to all match. Any suggestions?

      1. I suggest you have tried it with your administration account that comes with the federation. You also have a pure Office 365 tenant administrator. You should try this account. The sign-in method I use to authenticate supports only pure Office 365 authentication but not ADFS user.

        This I think is the cause of this error message.

  6. This is really very helpful.Thanks for the Post.If we want to create or migrate Custom profile properties from SharePoint 2010 to Office365,how we can achieve it?
    Please help on this.

    1. The CSV import supports those custom property import. All you need to do is to specify the name of the property on the first line. Unfortunately I don’t have a script ready that exports it from the on premise installation but you might find one on the web.
      /Stefan

  7. Hi Stefan,

    The tool is really good.

    I have a little issue, some of my users are in office365 but have never log in the sharepoint site, so the User Profile is not created.

    How can I bulk create the user profile first?

    1. Hi Julian,

      thank you for your feedback. Currently I don’t support the bulk creation of the profiles but it can be done with code. You might will find some powershell that does the job.

      /Stefan

  8. Hello Stefan,

    How do we bulk upload employee id or Skills to Manage User Profiles in Sharepoint online in Office 365.

    Please help me on this.

    Regards,
    Srinivas.K

    1. Please make sure that the CSV is Tab separated and not delimited by comma. The skills go directly into the managed meta data. The field name is SPS-Skill and you should check how the various items are delimited. This can be semicolon or a comma. You text file need to have the same delimiter inside.

      /Stefan

  9. Hello Stefan,

    After getting the authentication, I am getting the below error.

    Unhandled Exception: System.Web.Services.Protocols.SoapException: Server was una
    ble to process request. —> Object reference not set to an instance of an objec
    t.
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClie
    ntMessage message, WebResponse response, Stream responseStream, Boolean asyncCal
    l)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN
    ame, Object[] parameters)
    at n8d.UserProfileBulkImport.UserProfileWS.UserProfileService.GetUserProperty
    ByAccountName(String accountName, String propertyName)
    at n8d.UserProfileBulkImport.UserProfileUpdater.Update()
    at n8d.UserProfileBulkImport.Program.Main(String[] args)

    Please let me know what mistake I am doing here.

    Regards,
    Srinivas.K

    1. During my testing I got the same error when I tried to access the web service from a site collection URL. Please make sure that you pass in the SharePoint Administration URL from Office 365 and not the one of the portal.

      /Stefan

  10. Hi Stefan,
    thanks for the tutorial!
    I somehow get the error “Identity Client Runtime Library could not look up the realm information for a federated sign-in.”.
    Do you know if this error is related to the code, any dlls or the credentials (which seem to be right)?

    Thanks! Max

      1. Hey Stefan,

        thanks for the instant reply! It worked smoothly with my colleague’s account. Great!
        I saw the PnP solution before and embarrasingly still do not know how to find/generate the .exe file..?

        Thanks again for your work and help!

        1. Hi Max,

          to generate the solution you need to open it in Visual Studio and compile it manually. Glad to hear that it works for you now.

          /Stefan

          1. Thanks Stefan! Do you know if there is a way to include commas in a single value field? It seems to serve as some kind of blocker that cuts the rest of the field to be imported.
            Both ” and ‘ are entered in the field. I try to insert something like “Wien, sterreich” (without “).
            Thanks a bunch!!

          2. Hi Maximilian,

            from my point of view it shouldn’t be a problem with my code because I use tab-stops as delimiters so it shouldn’t split the common. You also don’t need the quotes. I haven’t tested it but I think it should work. Is there a special error you got back?

            /greetings
            Stefan

  11. Every time I’m running the tool, it tells me that n8d.UserProfileBulkImport has stopped working. It is always breaking with a SOAPException was unhandled. Any ideas as to why this is happening. Thanks

    1. Hi Scott,
      sorry haven’t used the code in a while. Maybe Microsoft has changed something in the background.
      Have you tried to pass in the url to the Office 365 admin interface?
      /Greetings
      Stefan

      1. Stefan,

        Got it working. My Text File was saved as UTF-8 Encoded. Once change to ANSI it worked like a charm.

  12. Hi Stefan,

    Firstly, great tool. However I am finding an issue. The tool advises that Server was unable to process request. —> UserProfileDBCache_WCFLogging :: Prof
    ileDBCacheServiceClient.GetUserData threw exception: Data Not Found: Invalid con
    figuration. —> Data Not Found: Invalid configuration. —> The creator of this
    fault did not specify a Reason.
    Server was unable to process request. —> UserProfileDBCache_WCFLogging :: Prof
    ileDBCacheServiceClient.GetUserData threw exception: Data Not Found: Invalid con
    figuration. —> Data Not Found: Invalid configuration. —> The creator of this
    fault did not specify a Reason.

    Unhandled Exception: System.Web.Services.Protocols.SoapException: Server was una
    ble to process request. —> UserProfileDBCache_WCFLogging :: ProfileDBCacheServ
    iceClient.GetUserData threw exception: Data Not Found: Invalid configuration. —
    -> Data Not Found: Invalid configuration. —> The creator of this fault did not
    specify a Reason.
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClie
    ntMessage message, WebResponse response, Stream responseStream, Boolean asyncCal
    l)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN
    ame, Object[] parameters)
    at n8d.UserProfileBulkImport.UserProfileWS.UserProfileService.GetUserProperty
    ByAccountName(String accountName, String propertyName) in c:\Projects\n8d.UserPr
    ofileBulkImport\n8d.UserProfileBulkImport\Web References\UserProfileWS\Reference
    .cs:line 531
    at n8d.UserProfileBulkImport.UserProfileUpdater.Update() in c:\Projects\n8d.U
    serProfileBulkImport\n8d.UserProfileBulkImport\UserProfileUpdater.cs:line 70
    at n8d.UserProfileBulkImport.Program.Main(String[] args) in c:\Projects\n8d.U
    serProfileBulkImport\n8d.UserProfileBulkImport\Program.cs:line 58

  13. Hi,
    Have a Authentication Problem:

    C:\bin\UserProfileBulkImport>n8d.UserProfileBulkImport.exe https://amiltd-admin.sharepoint.com/ u2@ami.ua import.csv
    Enter password: ***********
    The partner returned a bad sign-in name or password error. For more information
    see Federation Error-handling Scenarios.

    I do this from the Win2012R2 server.
    + 2 cents: fore example:
    If u2@ami.ua password is: qwerty and i`m enter this pasword i see:
    ******
    This is Ok.
    But, when i press key “Enter’ – i see new “*” and after this:
    *******
    and see error…

    Please, help me

  14. Thanks
    I was able toupdate custom properties for all user, but if try to setup Time Zone property i get below error
    Input file has
    AccountName SPS-TimeZone
    user@domain.com (UTC-05:00) Eastern Time (US and Canada)
    ERROR
    Begin updating user profiles
    Server was unable to process request. —> Invalid time zone format. The value must be SPTimeZone object, a valid integer time zone ID, or a string representation of a valid integer time zone ID.

    1. Hi,

      never had to set the time zone. I think the best way to find out the correct format will be if you set it manually.
      After that read the value that have been stored on the time zone.

      I think this should work. If you have still troubles I check it in one of my development environments

      /Stefan

      1. Thanks
        I was able to figure it out TimeZone property needs integer value
        Like form UTC eastern time, we need to put 76

        BTW have used your script to upload user picture on profile picture properties. That’s my next requirement I working on

          1. Ya i have use that one initially.

            In your scripte if user is not found online it will error out and stop, is it possible to add logic to check “Msoluser ” if not found skip so script will keep running for 20-40K user update.
            let me know if it possible where should i update code.

  15. Hi Stefan,
    Thank you for sharing this tool.
    We are trying to use the tool but we keep getting “The partner returned a bad sign-in name or password error. For more information, see Federation Error-handling Scenarios.”
    We are the SharePoint Admins and are sure the account credentials are correct.
    Can you shed some light?

  16. I have been using this tool successfully for the past 5 years, however now I get the error “Something went wrong but no exception was raised sorry
    WORK DONE !!!” right after I authenticate. I don’t think it’s even passing the password as it’s the same error if I type the correct or incorrect password. I have reinstalled the Sharepoint client component, and tried from a different computer. Any assistance would be appreciated!

  17. Hello Stefan, I can’t seem to run the application any longer. I get an error that states “Something went wrong but no exception was raised sorry WORK DONE !!!” after I input my password. I have not had any issues for the past 5 years, so I’m not sure what changed, or what I might be doing wrong. Any help would be greatly apprecaited!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.