Skip to main content

Device Administrator Enrollment Requiered for Teams Android Authentication | Teams Android-based Systems Cannot Login

Creating Teams Rooms Resource Account via Microsoft 365 and PowerShell

Hey, everyone! This is the first post of the series called "How to Set up Microsoft Teams Rooms", so you'll find a step-by-step guide on this blog. I decided to start it because I was helping a company deploying their MTRs but they didn't know anything about resource account, Teams Rooms licenses and so on, but today, everyone could learn how to set up and deploy Microsoft Teams Rooms.

Resource accounts for Teams rooms

The first thing is the resource account, and you can create it via:

  • PowerShell
  • Microsoft 365
  • Active Directory Users and Computers 

You prefer a video to a reading? You should visit my YouTube Channel here, or watch the following video:

 

Remember, every Teams Room requires its own resource account, and today you'll learn how to create a resource account using O365 and PowerShell. If you ask me... I recommend you create your resource account by using PowerShell because you can enable interesting features with it and take advantage of them. On the other hand, in the next post, I'm gonna only talk about PowerShell, so the best way to get familiar with something is through repetition and practice.

Creating Resource Account for Microsoft Teams Rooms

Method 1: Microsoft 365

 Go to admin.Microsoft.com, click on Resources > Rooms & equipment > Add resource

Microsoft Teams Room Account 

Fill up the black and click Save, for more details, read the following:

  • Resource Type: Set as Room, because equipment option is for vehicles, projectors, and things everyone may use.
  • Name: The name of your conference room.
  • Email: One email for your new room.
  • Capacity: Optional, but it's used for capacity notifications, and your users can know how many people could be there, and they can choose another room which meets their needs.
  • Location: Where your room at? Austin, West, Miami?
  • Phone Number: It's optional, and it doesn't assign a phone number!! Haha that's funny, right? In next posts, I'll show how to do it, but at this moment, this option adds an entry into AAD.

Microsoft Resource

Your new resource is ready! However, it's not ready for Teams. You can add another resource, if you need. At this time, click on Edit booking options.

Microsoft Resource for Teams Rooms

As you may know, Allow repeating meetings, automatically decline meetings outside of limits and auto accept meetings requests are enabled by default. Now, you can set limits, if you need, when you are finished click on Save changes.

Microsoft Teams Resource

You need to assign a password and license to your new resource, therefore, Click Users, and then Active Users.

Resource for Teams Rooms

Your new resource is now displayed under Active users, click on it, and then Reset Password.

Resource for Teams Rooms

 Resource for Teams Rooms

Ensure that Automatically create a password and require this user to change their password when they first sign in are unchecked, create a password and finally click on Reset password button.


Reset password

Again, select your resource (displayed under active users) and click on Licenses and apps. Look for te appropriate Microsoft Teams Rooms License (Basic or Pro), and make sure it is checked, after that, click Save changes.

Assign a license to Teams Rooms

Teams Rooms License

Assign License to Teams Rooms

Now, your resource is ready for your Teams Room! However, I recommend you read the information at the bottom of this blog post in order to know features you may need to enable.

Method 2: PowerShell

First, Make sure certain modules are installed, you need Microsoft Teams, Exchange Online Management and Azure Active Directory. Once you install modules, you will always be available to use them.

First time using PowerShell? Install modules !!

Use the following commands to install the modules:

Install-module MicrosoftTeams
Install-module ExchangeOnlineManagement
Install-Module AzureAD

Teams Rooms Resource Account

Note: Enter Y (Yes), and then A (Yes to all) when asked

Teams Rooms Resource Account

Install Module in PowerShell

Connecting to Azure and Exchange

Connect to Azure and Exchange using the following command:

Connect-AzureAD
Connect-ExchangeOnline -ShowProgress $true

A sign-in window will pop up, so type in your admin credentials.

Connect-AzureAD

Change the execution policy by using the following command:

Set-ExecutionPolicy Unrestricted 

Set-ExecutionPolicy Unrestricted

Before assigning and creating teams rooms resource, make sure you have teams rooms licenses by running the following command:

Get-AzureADSubscribedSku | Select -Property Sku*,ConsumedUnits -ExpandProperty PrepaidUnits

What licenses I have on O365?

Now you can know how many available licenses you have. For instance, I'm using 4 out of 10, therefore, there's only 6 left.

How many licenses i have on o365?

Variable Definition

To make it easier, let's define our variables

#Account name
    $acctUpn='yourteamsroom@contoso.com'
#The unique name of the mailbox
    $MailBoxName='yourteamsroom'
#Specify the Exchange alias for the recipient (mail nickname)
    $MailBoxAlias='yourteamsroom'
#Password for the account
    $Password='ThisIs1ReallyLongPassword!'
#License to assign
    $ADLicense='4cde982a-ede4-4409-9ae6-b003453c8ea6'
#Two letter ISO code for the country where the tenant is registered
    $UsageLocation='ISO Code'
#Display name for the room
    $DisplayName='Your Teams Room'

Regarding ISO code, you may need to take a look at this link made by Wikipedia, you can find your code there, mine is US, for instance. Type in your variables into powershell, and hit enter button.

How to create Teams Room Resource

Creating Mailbox

Let's create its mailbox!! Copy and paste the following code:

New-Mailbox -Name $acctUpn -Alias $MailBoxAlias -Room –DisplayName $DisplayName -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String $Password -AsPlainText -Force)

How to create mailbox Powershell

For example, I've created a new room in order to take a screenshot of all the code.

How to create Teams Room Resource

Setting outlook  (auto-accept meetings) and password (never expired)

Again, copy n paste the following code for automatically acepting meetings:

Set-CalendarProcessing -Identity $MailBoxAlias -AutomateProcessing AutoAccept

And paste the following one for setting the account's password to never expire:

Set-AzureADUser -ObjectID $acctUpn -PasswordPolicies DisablePasswordExpiration

Auto-Accept meetings powershell

Assigning License

Last but not least, assign your Microsoft Teams Room license! First, create one object for the license to be assigned by running the following code:

$License = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense
$License.SkuId = $ADLicense
$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses
$Licenses.AddLicenses = $License

 Assing a License on Powershell

To add usage location value, run this command:

Usage Location on powershell

Finally, assign the license to your room.

Set-AzureADUserLicense -ObjectId $acctUpn -AssignedLicenses $Licenses

Now, your Resource account is ready! It can sign into a Microsoft Teams Rooms system, but you may want to enable 3rd party meetings and cross-tenant meeting invitations, right? In next section, I'm showing you how that can be done, but in next blog post, I'm gonna show you how to create a script to automate account creation.

In the following image, you can find all the commands:

Resource for Teams Rooms

Setting up Mailbox

Probably you created you Teams Room Resource account by using Microsoft 365 because it's the easiest way to do so, if so, please run PowerShell as admin and connect to Exchange. If you have created your resource account by using PowerShell, you don't need to rerun powershell, just run the following commands without connecting to Exchange again:

Set-CalendarProcessing –Identity yourteamsroom@contoso.com –AutomateProcessing AutoAccept –AllowConflicts $false –AddOrganizerToSubject $false –RemovePrivateProperty $false –DeleteComments $false –DeleteSubject $false –ProcessExternalMeetingMessages $true

Note: Don't forget to add your Resource account!! 

Set-CalendarProcessing

To connect to Exchange, run the following command:

Connect-ExchangeOnline

Note: Before connecting to exchange, make sure you have installed the module, if not, go back to the section above called "Method 2: PowerShell" and run the commands.

That's all for today! Thanks for reading. If you have any questions, feel free to reach out. Remember to subscribe to this blog, my YT channel, and follow me on my social media.

Connect with me

If you like my blog, and it's helped you, let me know with a coffee 😃😄

Comments

Popular posts from this blog

How to Upgrade and Downgrade a Studio X or G7500 using Custom Server, Web UI or Poly Lens

There are several options to update and downgrade your Poly systems, today I'm going to show you how these 3 options (Custom Server, Web User Interface, Poly Lens Cloud) can be done.

Couldn't Connect to Workplace Join. Try again, or contact your admin

I was writing a new blog post about Microsoft Teams Panels, and guess what, dear reader? One user came across a new issue!! And he told me about it, so, let's talk about how to fix "Couldn't Connect to Workplace Join. Try again, or contact your admin".

How to Set up Poly Studio X Series | Configuring Studio X Series for the First Time

In this blog post, I'll be showing you how to configure your new Studio X30, X50 or X70.

How to Access and Control Microsoft Teams Rooms Remotely

The day has come for me to write this blog post! My colleagues asked me for showing them how to Control MTRoW remotely, In addition, I took part of Get-CS LATAM event last week, and I was delivering a tech presentation in-person, I showed the attendees how to access and control their Microsoft Teams Rooms remotely, so  I decided to publish a post to help them, my colleagues and everyone.

Device Administrator Enrollment Requiered for Teams Android Authentication | Teams Android-based Systems Cannot Login

Hello, Everyone!! 👀 This will be a short blog post, but I just wanna make you aware of this new requirement. The rules have changed for MTRoA deployments, now we must turn on Device Admin Enrollment in Intune. In case you don't know where we can turn it on, or you haven't used Intune (Endpoint Manager), don't worry, this blog post will help you get by.