+ Post New Thread
Results 1 to 15 of 15
Cloud Services Thread, Office 365 upload users via CSV file in Technical; A few years ago I got this working with Live@EDU but that was a few years ago now. I'm trying ...
  1. #1

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    671
    Thank Post
    155
    Thanked 51 Times in 49 Posts
    Rep Power
    33

    Office 365 upload users via CSV file

    A few years ago I got this working with Live@EDU but that was a few years ago now.

    I'm trying a simple command from the Azure PowerShell window


    Import-Csv -Path c:\apps\office365\1.csv | ForEach-Object {New-MsolUser -FirstName $_.FirstName -LastName $_.LastName -UserPrincipalName $_.UserPrincipalName -DisplayName "$($_.FirstName) $($_.LastName)" -LicenseAssignment 'OUTPUT OMITED' -UsageLocation GB}

    No matter where I put the -UserPrincipalName it fails saying 'New-MsolUser : You must provide a required property: Parameter name: UserPrincipalName'


    The account is still partially created and the user can login to Office 365.

    If you put all the settings in the above command instead of reading from the csv then it works perfectly.

    Please help I can't afford to pull any more hair out

    How do other people do this ?

  2. #2
    timbo343's Avatar
    Join Date
    Dec 2005
    Location
    Leeds/York area, North Yorkshire
    Posts
    2,772
    Thank Post
    251
    Thanked 220 Times in 168 Posts
    Rep Power
    87
    I used to create everything in excel and then import with the import via csv through the GUI. Thats the bulk add option by the way.
    Last edited by timbo343; 9th January 2014 at 06:55 PM.

  3. #3

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    8,941
    Thank Post
    232
    Thanked 1,510 Times in 1,206 Posts
    Rep Power
    328
    It's better to bulk upload through the GUI (as above). Remember unlike Live@Edu, Office 365 requires you to allocate licenses to users (even if you're using the free A2). You can do this during the import process. I also believe you're limited to 250 users per CSV file too.

  4. #4

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    671
    Thank Post
    155
    Thanked 51 Times in 49 Posts
    Rep Power
    33
    Thanks Michael,

    Unfortunately with the GUI it can't be automated, been a college we could have in Excess of 4,000 students enroll every September.

    I've heard about the 250 limit but we may be able to do something trick with that within SQL for that.

    With Live@EDU it used to be a right pain through the GUI so we used to do a PowelShell.

  5. #5

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    8,941
    Thank Post
    232
    Thanked 1,510 Times in 1,206 Posts
    Rep Power
    328
    Quote Originally Posted by Davit2005 View Post
    Thanks Michael,

    Unfortunately with the GUI it can't be automated, been a college we could have in Excess of 4,000 students enroll every September.

    I've heard about the 250 limit but we may be able to do something trick with that within SQL for that.

    With Live@EDU it used to be a right pain through the GUI so we used to do a PowelShell.
    I think it's fair to say the interface is definitely 'better' than what it was with Live@Edu.

    Personally I think with a number like 4000 pupils, (in addition to staff) an SSO solution would be better and everything would sync with your existing Active Directory setup. It can be somewhat fiddly, but would automate the procedure when pupils come and go.

  6. Thanks to Michael from:

    Davit2005 (13th January 2014)

  7. #6

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    671
    Thank Post
    155
    Thanked 51 Times in 49 Posts
    Rep Power
    33
    Definately looking at the SSO side

    But still unsure about the provisioning of users i.e. assigning licenses to users.

    Not looking at rolling out till September 2014 but I know Live@EDU took me a good few months to prepare with other work committments

    Thanks for help

  8. #7
    jamesbmarshall's Avatar
    Join Date
    Feb 2010
    Location
    Reading, UK
    Posts
    454
    Thank Post
    24
    Thanked 204 Times in 142 Posts
    Rep Power
    80
    Quote Originally Posted by Davit2005 View Post
    Definately looking at the SSO side

    But still unsure about the provisioning of users i.e. assigning licenses to users.
    Take a look at this: Deploying Office 365 Education? You don't need single sign-on, and here's why!

    You should look at DirSync, that will take care of your user sync, and password sync. As for licences this can be wrapped up in a PowerShell script that you can run whenever you add new users.

  9. Thanks to jamesbmarshall from:

    Davit2005 (13th January 2014)

  10. #8

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    671
    Thank Post
    155
    Thanked 51 Times in 49 Posts
    Rep Power
    33
    Anyone got any sample scripts for the powershell,

    The following command:

    Import-Csv -Path c:\apps\office365\1.csv | ForEach-Object {New-MsolUser -FirstName $_.FirstName -LastName $_.LastName -UserPrincipalName $_.UserPrincipalName -DisplayName "$($_.FirstName) $($_.LastName)" -LicenseAssignment 'OUTPUT OMITED' -UsageLocation GB}

    No matter where I put the -UserPrincipalName it fails saying 'New-MsolUser : You must provide a required property: Parameter name: UserPrincipalName'


    The account is still partially created and the user can login to Office 365.

  11. #9

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    671
    Thank Post
    155
    Thanked 51 Times in 49 Posts
    Rep Power
    33
    Help please, can anyone can point me in the right direction of commands that will upload a csv via PowerShell, we need this method as doing 4000+ a year via the GUI is not reasonable.

    If this can be done via setting up active directory Sync is it possible default the Licence/subscriptions for users or how would we do that.

    Also is it possible to tie down the users information page like you could in Live@EDU

    We are on the A2 Educational Plan if that makes a difference.

    I have already set up my computer to talk with Office365 via powershell.


  12. #10
    Boredguy's Avatar
    Join Date
    Jun 2011
    Location
    Swindon
    Posts
    464
    Thank Post
    2
    Thanked 107 Times in 98 Posts
    Rep Power
    24
    We are using DirSync to create our 365 users since it's easier then worrying about CSV files all the time.

    We have a powershell script that runs on a regular basis that takes 50 unlicensed student users and applies the relivent A2 permission, as well as the adjusted policies that we created to lock down what users can update in their profile
    The full script can be found in this thread

  13. Thanks to Boredguy from:

    Davit2005 (14th January 2014)

  14. #11

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    671
    Thank Post
    155
    Thanked 51 Times in 49 Posts
    Rep Power
    33
    Currently we only have a local domain internally within the domain i.e. something.local . Will this cause problems if we use any king of AD Sync tool or can we change the users as they sync with Office 365?

  15. #12
    Boredguy's Avatar
    Join Date
    Jun 2011
    Location
    Swindon
    Posts
    464
    Thank Post
    2
    Thanked 107 Times in 98 Posts
    Rep Power
    24
    If your AD is different to your Office 365 Domain, all you need to do it add your external domain in AD Domains and Trusts as an additional UPN suffix (Right click the AD Domains and Trust top node when you open the console and go to properties ), and then for your users, select that UPN suffix instead of your .local one.

    Unless you have any other strange programs on your network that use the UPN suffix you should be fine. Test it with a couple of users if you are not sure what might break.

  16. #13

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    671
    Thank Post
    155
    Thanked 51 Times in 49 Posts
    Rep Power
    33
    Well yesterday I had success at last with the csv upload via powershell

    I run a script to create a variable to disable Lync and in the upload command I can assign the license. When looking on the Office 365 the user is assigned the correct license with Lync disabled as we wanted.

    The next thing is to apply an additional licence to apply the Office Plus user license that we have through our VL agreement or maybe create a variable to add the licenses required for the user at time of csv upload. Or alternatively run the script afterwards for all the users.

  17. #14

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    671
    Thank Post
    155
    Thanked 51 Times in 49 Posts
    Rep Power
    33
    Quote Originally Posted by Boredguy View Post
    If your AD is different to your Office 365 Domain, all you need to do it add your external domain in AD Domains and Trusts as an additional UPN suffix (Right click the AD Domains and Trust top node when you open the console and go to properties ), and then for your users, select that UPN suffix instead of your .local one.
    I think we should be alright with that obvoiusly will have to test.

    Whether ADFS would make the authentication any easier I'll have to investigate, I realise that if our ADFS servers are not available users will not be able to authenticate to Office365 but hopefully within the year we should have a bit of resilience for AD, Internet etc. on a second site with any luck.

  18. #15
    Boredguy's Avatar
    Join Date
    Jun 2011
    Location
    Swindon
    Posts
    464
    Thank Post
    2
    Thanked 107 Times in 98 Posts
    Rep Power
    24
    I would go for DirSync first since it keeps it easier (ie if your servers are down they can still login to 365 with their current network password.)
    The powershell string for assigning the Office Advantage is in another thread in this forum section and can be set at the same time as disabling Lync.

  19. Thanks to Boredguy from:

    Davit2005 (15th January 2014)

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 0
    Last Post: 14th July 2013, 01:56 AM
  2. Office 365 on iphone via app
    By Max_Power in forum Office Software
    Replies: 0
    Last Post: 17th June 2013, 10:32 AM
  3. Office 365 federated users, locked out
    By mbedford in forum Cloud Services
    Replies: 5
    Last Post: 27th February 2013, 07:34 PM
  4. EasyTrace - importing users via CSV
    By saintoctopus in forum How do you do....it?
    Replies: 3
    Last Post: 15th June 2011, 09:08 AM
  5. Replies: 6
    Last Post: 29th February 2008, 12:03 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •