SOLVED

Deleted Resource account with phone number still assigned.

Copper Contributor

At the bottom Manage resource accounts in teams, there is a section for deleting resource accounts. 

Manage resource accounts in Teams - Microsoft Teams | Microsoft Docs

 

It states: Make sure you dissociate the telephone number from the resource account before deleting it, to avoid getting your service number stuck in pending mode.

 

My question is: what happens if you forgot to unassign the phone number from the resource account before deleting it? :| 

 

I worked with a tech from Support and he had me try several powershell commands, but nothing worked. He is going to get back to be, but I thought I'd ask here! 

12 Replies

I may have a similar issue. Did you hear anything from support? @rsmoot 

Exactly the same issue here. Number still seems to be in limbo, resource account has been removed but the direct routing number cannot be assingned to another user as it still thinks its in use.

Looking at the PSTN logs via Teams the calls are still pointing to the old resource account.

Ive had a ticket open for a month with Microsoft support and we are no further forward with a resolution. Does anyone know how this can be resolved?
anyone had any luck with this? in the same boat

In the same boat.  Have a ticket open with MS now on this.  Hopefully I'll get an answer and can come back here and reply.

I had the same issue but managed to resolve it by going to the Azure AD admin centre and purging the deleted resource account from deleted users.

Took about 30mins from the list when running the command "Get-CsPhoneNumberAssignment -PstnAssignmentStatus VoiceApplicationAssigned"
This worked for me. Thank you

@rsmoot 

 

Hellas,

 

We're stuck with the same problem. Our IT partner deleted the Resource Account with our main office Number. And now we're stuck with the problem as mentionned by others.

 

Unfortunately nothing helps via Azure. We're in contact with Microsoft but it takes ages to explain and to deliver log-files and re-explain.

 

Any one any idea how to speed things up?

 

Regards

André

This worked for 2/3 accounts @nharwood 

This is what worked for me.

 

I got the AssignedPstnTargetId of the phone number from running this command “Get-CsPhoneNumberAssignment -PstnAssignmentStatus VoiceApplicationAssigned”.

 

I then ran the command using the value of AssignedPstnTargetId for the Identity.

“Remove-CsPhoneNumberAssignment -Identity ‘AssignedPstnTargetId’ -RemoveAll”

best response confirmed by Greg Anthony (Microsoft)
Solution

If you delete a resource account without first removing the phone number you can run Get-CsPhoneNumberAssignment -TelephoneNumber <+phonenumber> and note the AssignedPstnTargetId which is the Identity of the deleted Resource Account.

Then run the following to remove the number.
Remove-CsPhoneNumberAssignment -Identity <AssignedPstnTargetId> -PhoneNumber <+phonenumber to unassign> -PhoneNumberType <DirectRouting|CallingPlan|OperatorConnect>

I haven't tried this but if this works, this is a great solution. Typically you need to open a support case with Microsoft and it takes 2-3 days to find the right contact and reach a resolution. @Greg Anthony 

If you delete a resource account via the Microsoft 365 Admin center, you can complete wipe it away from your tenant by accessing the "deleted users" under the Microsoft Entra admin center...select the offending account and "delete permanently"!

 

LloydSavage_0-1707955145469.png

 

1 best response

Accepted Solutions
best response confirmed by Greg Anthony (Microsoft)
Solution

If you delete a resource account without first removing the phone number you can run Get-CsPhoneNumberAssignment -TelephoneNumber <+phonenumber> and note the AssignedPstnTargetId which is the Identity of the deleted Resource Account.

Then run the following to remove the number.
Remove-CsPhoneNumberAssignment -Identity <AssignedPstnTargetId> -PhoneNumber <+phonenumber to unassign> -PhoneNumberType <DirectRouting|CallingPlan|OperatorConnect>

View solution in original post