Although I have not fully tested this other method, I do recognize some of the condition you are seeing. Most likely you are having an issue with authentication to Azure and/or a missing level of access. You should be able to still grab the access token this way.
I would test trying from the ground-up to re-connect to Azure with "Connect-Azaccount" to verify it has an updated token, then check your context with "Get-AzContext" to make sure you are running commands on the correct subscription that you have the appropriate levels of access to. You can use "Set-AzContext" to point to the correct subscription if needed. If that is all set fine and it is not working, then you most likely do not have the needed access level to perform the action.