{"id":2247,"date":"2018-08-20T09:58:21","date_gmt":"2018-08-20T07:58:21","guid":{"rendered":"https:\/\/msb365.abstergo.ch\/?p=2247"},"modified":"2023-06-23T13:19:45","modified_gmt":"2023-06-23T11:19:45","slug":"assign-licenses-to-users-in-office-365-for-business","status":"publish","type":"post","link":"https:\/\/www.msb365.blog\/?p=2247","title":{"rendered":"Assign licenses to users in Office 365 for business"},"content":{"rendered":"<p>We have a new employee in our company, who starts his work as junior System Engineer. However, as a junior there are still many things to learn and I am also responsible to show him some things from the Microsoft Exchange and Office 365 world. Honestly saying, I like the new Guy, he is motivated and he asks questions about things he don\u2019t know.<\/p>\n<p>From my point of view this two skills (being motivated and not being scared to ask questions) are a good for start and to become a good Engineer in the future.<\/p>\n<p>Some days ago, he asked me how to assign licenses to users in Office 365. To show that was not a big deal. However, in the evening by driving home from work, I came to the idea to write a short article about that. Not just how to enable a license for one user, also different ways how this can be done for multiple or by using other ways like PowerShell.<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<h2>Assign license for one user, using Office 365 admin center<\/h2>\n<p>After logging in to the Office 365 admin center, we browse to <strong>Users<\/strong> > <strong>Active users<\/strong> and here we search for the user, we want to assign a license.<\/p>\n<p>In the tab <strong>Product licenses<\/strong> we chose the option <strong>Edit<\/strong>.<\/p>\n<p>As we can see in the picture below, (and depends about our subscriptions). We simply switch the toggle to <strong>On<\/strong> position for the license that we want to assign to this user.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-2258\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/07\/1-1.png\" alt=\"\" width=\"543\" height=\"772\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/07\/1-1.png 543w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/07\/1-1-211x300.png 211w\" sizes=\"(max-width: 543px) 100vw, 543px\" \/><\/p>\n<p><strong>Note<\/strong>: By default, all services associated with that license are automatically assigned to the user. To limit services, which are available to the user, switch the toggles to the Off position for the services that you don\u2019t want that user has.<\/p>\n<p>\u00a0<\/p>\n<p>To finish this operation of assigning the license we need to scroll down to the bottom of <strong>the Product license<\/strong> pane and there we have to choose <strong>Save<\/strong>. If everything is fine this will be successful, and we can close the window. If we get an error here, we can check two points:<\/p>\n<ol>\n<li>Are there enough licenses available?<\/li>\n<li>Do we have set the user Location on the top?<\/li>\n<\/ol>\n<p>\u00a0<\/p>\n<h2>Assign license for multiple users<\/h2>\n<p>For assigning license to multiple users we can follow the steps like by a single user. However, there is just a little difference to the steps by a single user\u2026<\/p>\n<p>First, we need to log-in to our Office 365 admin center, after that we browse to <strong>Users<\/strong> > <strong>Active users<\/strong> and here we search for all the users, we want to assign a license.<\/p>\n<p>After selecting at least, a second user, we get a new popup window on the right site of our web browser, which is called Bulk actions.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2259\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/07\/2-1.png\" alt=\"\" width=\"281\" height=\"574\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/07\/2-1.png 281w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/07\/2-1-147x300.png 147w\" sizes=\"(max-width: 281px) 100vw, 281px\" \/><\/p>\n<p>As we can see, here we have now multiple options to continue our work. In our scenario we want to assign an Office 365 license to multiple users, in this case we need now to choose the option <strong>Edit product licenses.<\/strong><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2260\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/07\/3-1.png\" alt=\"\" width=\"255\" height=\"346\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/07\/3-1.png 255w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/07\/3-1-221x300.png 221w\" sizes=\"(max-width: 255px) 100vw, 255px\" \/><\/p>\n<p>Now we can assign the necessary licenses to the selected users.<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<h2>Enable license using PowerShell<\/h2>\n<p>Another way to assign licenses to the users in our company is with using PowerShell.<\/p>\n<p>The first thing we have to do is to connect to our Office 365 Tenant by using PowerShell. To do that, we need following commands:<\/p>\n<pre class=\"\">$UserCredential = Get-Credential\r\nConnect-MsolService -Credential $UserCredential<\/pre>\n<p>\u00a0<\/p>\n<p><strong>Note<\/strong>: if you haven\u2019t installed the MSOnline Module, you can do that by running your PowerShell with Administrative rights and hitting the following cmdlet:<\/p>\n<pre class=\"\">Install-Module MSOnline<\/pre>\n<p>\u00a0<\/p>\n<p>To be able to assign licenses by PowerShell, we need now to know the User Principal Name (UPN) of the user we want to assign the license. However, as well we need to know which license we want to assign. For an easier understanding you can have a look on the following example:<\/p>\n<pre class=\"\">Set-MsolUserLicense \u2013UserPrincipalName <a href=\"mailto:desmond.miles@contoso.com\">desmond.miles@contoso.com<\/a> \u2013AddLicenses \u201ccontoso:ENTERPRISEPACK\u201d<\/pre>\n<p>\u00a0<\/p>\n<p>So, how to know how the licenses are called in the PowerShell and how to find out how many freelicenses we still have? This we can figure out easily by using the following command:<\/p>\n<pre class=\"\">Get-MsolAccountSku<\/pre>\n<p>\u00a0<\/p>\n<p>Here is an example, how the output could look like:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2261\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/07\/4-1.png\" alt=\"\" width=\"465\" height=\"207\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/07\/4-1.png 465w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/07\/4-1-300x134.png 300w\" sizes=\"(max-width: 465px) 100vw, 465px\" \/><\/p>\n<p>Here we see the exact name and a number of Active and Consumed Units.<\/p>\n<p>\u00a0<\/p>\n<p>To get a list of all our users which has no license assigned, we can hit this command:<\/p>\n<pre class=\"\">Get-MsolUser \u2013All \u2013UnlicensedUserOnly<\/pre>\n<p>\u00a0<\/p>\n<p>This command can help us for assigning licenses for multiple users. As example the command could look like this:<\/p>\n<pre class=\"\">Get-MsolUser -All -UnlicensedUsersOnly; $AllUn | foreach {Set-MsolUserLicense -AddLicenses \"contoso:ENTERPRISEPACK\"}<\/pre>\n<p>\u00a0<\/p>\n<p>If we don\u2019t want to do that for the whole company, we also can do it for departments, then the command could look like this:<\/p>\n<pre class=\"\">Get-MsolUser -All -Department \"Sales\" -UsageLocation \"CH\" -UnlicensedUsersOnly; $Sales | foreach {Set-MsolUserLicense -AddLicenses \"contoso:ENTERPRISEPACK\"}<\/pre>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<h2>What we need to know about assigning licenses to users in Office 365<\/h2>\n<p>There are some things which are good to know about assigning licenses to our users:<\/p>\n<ul>\n<li>We need to be either a Global administrator or at least a User management administrator in our Office 365 Tenant.<\/li>\n<li>Some services, like Sway, are automatically assigned to users, and don\u2019t need to be assigned individually.<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<h2>Conclusion<\/h2>\n<p>In German we have an expression: \u201cViele Wege f\u00fchren nach Rom\u201d. That means, there are many ways how we can make sure that the users from our company has the right license assigned. The most common ones I have just showed here in this article. However, there are other ways as well. Just one of the examples: We can create Azure Active Directory groups-based licensing where we can add our users and then the licenses will be assigned automatically. If you are interested in this, I can recommend you the official Microsoft doc following the Link <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/fundamentals\/active-directory-licensing-whatis-azure-portal\" target=\"_blank\" rel=\"noopener\">HERE<\/a>.<\/p>\n<p>I guess the most of you knew at least one of the options I have shown in this article, from my point of view we need to take time and support our motivated junior Engineers by helping them going very first steps in the Office 365 and Azure world.<\/p>\n<p>\ud83d\ude42<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>Photo by\u00a0<a href=\"https:\/\/unsplash.com\/photos\/BjZT73Qq7_k?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText\">Steve Johnson<\/a>\u00a0on\u00a0<a href=\"https:\/\/unsplash.com\/search\/photos\/on-off?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText\">Unsplash<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have a new employee in our company, who starts his work as junior System Engineer. However, as a junior there are still many things to learn and I am also responsible to show him some things from the Microsoft Exchange and Office 365 world. Honestly saying, I like the new Guy, he is motivated [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2248,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[12,1923,3],"tags":[],"class_list":["post-2247","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","category-microsoft-365","category-powershell"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/2247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2247"}],"version-history":[{"count":7,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/2247\/revisions"}],"predecessor-version":[{"id":5220,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/2247\/revisions\/5220"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/media\/2248"}],"wp:attachment":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}