Forum Discussion
Deleted Resource account with phone number still assigned.
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!
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>
- Greg AnthonyMicrosoft
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>- LloydSavageCopper Contributor
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"!
- vorsiteCopper Contributor
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
- nharwoodCopper ContributorI 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"- kirstyaireyCopper ContributorThis worked for me. Thank you
- Martin-17Copper ContributorExactly 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? - Tgordon485Copper Contributoranyone had any luck with this? in the same boat
- DeanCBCopper Contributor
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.
- lonestar1978Copper Contributor
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é
- Rigel185Copper Contributor
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â