# Create Resource Account Using PowerShell

{% hint style="warning" %}
**Please use the latest Teams PowerShell module when running the following commands in step 1.**
{% endhint %}

1\. Connect to Teams PowerShell | Run the following command for the data center location of your Landis Contact Center organization.

{% tabs %}
{% tab title="North America" %}

<pre><code><strong>New-CsOnlineApplicationInstance -ApplicationId "341e195c-b261-4b05-8ba5-dd4a89b1f3e7" -UserPrincipalName "Resource Account Username" -DisplayName "Display Name"
</strong></code></pre>

{% endtab %}

{% tab title="EMEA" %}

<pre><code><strong>New-CsOnlineApplicationInstance -ApplicationId "f5551fac-fcff-4de6-b530-b5c2d847b758" -UserPrincipalName "Resource Account Username" -DisplayName "Display Name"
</strong></code></pre>

{% endtab %}
{% endtabs %}

*Note: Replace "Resource Account Username" in the above command with a new unique username. Do the same with "Display Name". Do not change the application ID.*

2\. Navigate to Microsoft 365 admin portal | Users | Active Users | Assign the resource account user a "Microsoft Teams Phone Resource Account" license.

3\. Assign a phone number to a queue (optional)

Run the following PowerShell Command:

```
Set-CsPhoneNumberAssignment -PhoneNumber "Number" -Identity "Resource Account Username" -PhoneNumberType CallingPlan
```

*Note: Replace "Number" with an available phone number in your environment. Replace "Resource Account Username" with the UPN of the resource account created in step 1. You may also need to change the PhoneNumberType if using DirectRouting or OperatorConnect.*&#x20;

4\. Run the following PowerShell command:

```
(Get-CsOnlineApplicationInstance -Identity "Resource Account Username").ObjectID
```

*Note: Replace "Resource Account Username" in the above command with the UPN of the resource account created in step 1.*

From the output of the above command, copy the ObjectID GUID. This will be used in the next step.

5\. Navigate to Queues & IVRs | Connectors | Resource accounts | Add | Enter a Name. Paste the ObjectID GUID in the Object ID field. Select the Interaction Object (Queue or IVR) that should be associated with the resource account. Description, Phone Number, and User principal Name is optional.

{% hint style="info" %}
This Resource Account record is a duplicate of the Microsoft Teams Resource Account. It determines to which Queue or IVR the call is routed.
{% endhint %}

{% hint style="warning" %}
The Microsoft Teams resource accounts are not automatically synced with Contact Center. When resource accounts are created or changed in Teams, they will need to be manually created or updated in Contact Center.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cc.docs.landis.cloud/appendix/create-resource-account-using-powershell.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
