Recently I changed my Azure login to use my organisational account rather than a Microsoft account for a particular subscription. Following this I found I was unable to access the subscription via PowerShell.
Running the cmdlet "Get-AzSubscription" (or "Get-AzureRmSubscription" if you use the older command set) returned the information for most of my subscriptions but threw the following warning for the subscription where my login had been changed;
WARNING: Unable to acquire token for tenant 'x''After some investigation I found that my old credentials were cached in the context. Running the following cmdlet cleared this cache and allowed the subscription to be access via PowerShell again;
Clear-AzContext
(or Clear-AzureRmContext with the older cmdlets)
You can disable this auto-caching of tokens by using the following;
Disable-AzContextAutosave
(or Disable-AzureRmContextAutosave with the older cmdlets)
Thank you!
ReplyDeleteThank you very much - that seemed to be my issue!
ReplyDeleteSuch a appears to be fully very best. Each one of these very little facts usually are constructed combined with many qualifications facts. I prefer of which a whole bunch. microsoft office 365 product key
ReplyDeleteLooked all over the place for a fix but this simple bit of code sorted all my probelms. Thank you so much
ReplyDeleteThanks for this.
ReplyDeleteThank you so much! This was driving me mad!
ReplyDeleteYour blog has chock-a-block of useful information. I liked your blog's content as well as its look. In my opinion, this is a perfect blog in all aspects. 2ms office 2016 product key
ReplyDeleteThanks for the help
ReplyDeleteThanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. microsoft office 2016 free download full version
ReplyDeleteThanks so much
ReplyDeleteOnce Coinbase successfully linked to your account, click the link of the Sell/Buy Bitcoin. The link will direct you to the Buy area so simply enter the amount of Bitcoin that you need, tick on your bank account, and choose "buy Bitcoin". bitcoin mixer
ReplyDeleteWhen bought as a component of an Office 365 membership, the Office 2013 projects and related administrations are consistently accessible in the most recent form just as moves up to future adaptations of Microsoft Office for a similar membership charge what begins at $10 to $15 every month for home or independent company renditions. help with excel spreadsheets
ReplyDeleteSoftware engineering is an essential discipline when designing and implementing high performance data enterprises. Although software engineers are not certified or sanctioned by any standards body, use of software engineers with experience in the Intelligence Community increases chances of success. windows 10 pro product key
ReplyDeleteThe video game industry is moving fast and Microsoft are set to introduce their Kinect motion sensor in order to gain market share of the lucrative casual market. This article aims to examine Microsoft's marketing strategy and why what they might be planning for the Xbox brand windows 10 pro product key
ReplyDeleteKnown mostly as a spreadsheet program - Microsoft Excel can actually be utilized for various purposes. This is exactly why the program is heavily used by businesses all over the country. Underneath the deceptively simplistic design, Microsoft Excel is a powerful program that helps your business to flourish. word translator
ReplyDeleteIn order to fulfill your duty as a responsible citizen of the nation, one of the primary tasks you need to do is to pay for your income tax returns in a timely manner. Filing Income Tax Returns
ReplyDelete