Azure PowerShell for Service Management

%3CLINGO-SUB%20id%3D%22lingo-sub-46364%22%20slang%3D%22en-US%22%3EAzure%20PowerShell%20for%20Service%20Management%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-46364%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20%22classic%22%20VMs%20in%20Azure%20and%20scripts%20that%20I%20used%20to%20manage%20them.%20I%20have%20not%20needed%20to%20use%20the%20scripts%20for%20quite%20some%20time.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20attempting%20to%20use%20the%20scripts%20now%2C%20in%20what%20I%20know%20is%20%22Service%20Management%22%20mode.%20The%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fservicemanagement%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Edocumentation%20details%20how%20to%20download%20and%20install%20the%20cmdlets%3C%2FA%3E.%20Having%20done%20so%20(version%203.4.0)%2C%20I%20get%20an%20error%20when%20running%20Add-AzureAccount.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20get%20prompted%20to%20login%20(with%20MFA%20as%20I%20expect)%2C%20but%20the%20cmdlet%20reports%20an%20errror%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eadd-azureaccount%20%3A%20No%20subscriptions%20are%20associated%20with%20the%20logged%20in%20account%20in%20Azure%20Service%20Management%20(RDFE).%20This%3CBR%20%2F%3Emeans%20that%20the%20logged%20in%20user%20is%20not%20an%20administrator%20or%20co-administrator%20for%20any%20account.%5Cr%5CnDid%20you%20mean%20to%20execute%3CBR%20%2F%3ELogin-AzureRmAccount%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUsing%20the%20same%20account%20in%20the%20portal%20(and%20the%20%22classic%22%20portal)%20works%20just%20fine.%20And%20I%20confirmed%20that%20I%20am%20a%20co-administrator%20for%20the%20subscription.%20Has%20anyone%20had%20success%20using%20the%20Service%20Management%20cmdlets%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-46364%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-57891%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20PowerShell%20for%20Service%20Management%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-57891%22%20slang%3D%22en-US%22%3EI%20still%20just%20did%20today.%20With%20MFA%20as%20well.%20I%20had%20problems%20using%20a%20Microsoft%20account%20(live%20ID)%20but%20with%20an%20AAD%20account%20it%20just%20works.%20Don't%20use%20%22-Credentials%20%24cred%22.%20This%20didn't%20work%20as%20well.%3CBR%20%2F%3E%3CBR%20%2F%3EThere%20is%20the%20subscription%20level%20(settings%20-%26gt%3B%20administrators)%20and%20the%20AAD%20settings%20you%20should%20check%20for%20sufficient%20permissions.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-57574%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20PowerShell%20for%20Service%20Management%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-57574%22%20slang%3D%22en-US%22%3E%3CP%3EGreat%20question.%20We're%20looking%20into%20this%20and%20will%20try%20to%20get%20an%20answer%20for%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E
MVP

I have "classic" VMs in Azure and scripts that I used to manage them. I have not needed to use the scripts for quite some time.

 

I am attempting to use the scripts now, in what I know is "Service Management" mode. The documentation details how to download and install the cmdlets. Having done so (version 3.4.0), I get an error when running Add-AzureAccount.

 

I get prompted to login (with MFA as I expect), but the cmdlet reports an errror:

 

add-azureaccount : No subscriptions are associated with the logged in account in Azure Service Management (RDFE). This
means that the logged in user is not an administrator or co-administrator for any account.\r\nDid you mean to execute
Login-AzureRmAccount?

 

 

Using the same account in the portal (and the "classic" portal) works just fine. And I confirmed that I am a co-administrator for the subscription. Has anyone had success using the Service Management cmdlets

2 Replies

Great question. We're looking into this and will try to get an answer for you.

I still just did today. With MFA as well. I had problems using a Microsoft account (live ID) but with an AAD account it just works. Don't use "-Credentials $cred". This didn't work as well.

There is the subscription level (settings -> administrators) and the AAD settings you should check for sufficient permissions.