azureautomation / azure-automation-ise-addon

The Azure Automation PowerShell ISE Add-On makes it easy to author and test your runbooks in your local PowerShell ISE
https://www.powershellgallery.com/packages/AzureAutomationAuthoringToolkit/
Other
122 stars 24 forks source link

Unable to select subscription with O365 Organizational Login, autoselects first subscription and grays out the login box #87

Closed JustinGrote closed 9 years ago

JustinGrote commented 9 years ago

Hi guys,

Slightly odd issue, when attempting to log in with an O365 Organization login. I have multiple subscriptions but it autoselects the first subscription and box is grayed out, so I cannot select my MS Partner Subscription where my automation account. image

I tested with a different organizational account in another tenant and it worked fine and showed the multiple subscriptions and was able to toggle. One difference between the two is this is an ADFS integrated login whereas the non-functional login is AADConnect sync only. I'm fairly sure that's not related but it's worth bringing up.

Here's the fiddler XML output for the subscription query if there's any flags or anything which might be contributing to this behavior (unique details redacted)

<?xml version="1.0" encoding="UTF-8"?>
<Subscriptions xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
   <Subscription>
      <SubscriptionID>XXXXXXXXXXXXXXX</SubscriptionID>
      <SubscriptionName>Access to Azure Active Directory</SubscriptionName>
      <SubscriptionStatus>Active</SubscriptionStatus>
      <AccountAdminLiveEmailId>JGrote@XXXXXXXXXXXXXXX.net</AccountAdminLiveEmailId>
      <ServiceAdminLiveEmailId>jgrote@XXXXXXXXXXXXXXX.net</ServiceAdminLiveEmailId>
      <MaxCoreCount>20</MaxCoreCount>
      <MaxStorageAccounts>100</MaxStorageAccounts>
      <MaxHostedServices>20</MaxHostedServices>
      <CurrentCoreCount>0</CurrentCoreCount>
      <CurrentHostedServices>0</CurrentHostedServices>
      <CurrentStorageAccounts>0</CurrentStorageAccounts>
      <MaxVirtualNetworkSites>50</MaxVirtualNetworkSites>
      <MaxLocalNetworkSites>20</MaxLocalNetworkSites>
      <MaxDnsServers>20</MaxDnsServers>
      <OfferCategories>Azure_Platform_All;Azure_Direct;Azure_Paid;Azure_Hidden;Azure_Consumption;Azure_MS-AZR-0110P;Azure_AAD;Individual</OfferCategories>
      <MaxExtraVIPCount>-1</MaxExtraVIPCount>
      <AADTenantID>XXXXXXXXXXXXXXX</AADTenantID>
      <CreatedTime>2015-07-27T19:26:34Z</CreatedTime>
   </Subscription>
   <Subscription>
      <SubscriptionID>XXXXXXXXXXXXXXX</SubscriptionID>
      <SubscriptionName>Microsoft Partner Network</SubscriptionName>
      <SubscriptionStatus>Active</SubscriptionStatus>
      <AccountAdminLiveEmailId>JGrote@XXXXXXXXXXXXXXX.net</AccountAdminLiveEmailId>
      <ServiceAdminLiveEmailId>o365admin@XXXXXXXXXXXXXXX.onmicrosoft.com</ServiceAdminLiveEmailId>
      <MaxCoreCount>20</MaxCoreCount>
      <MaxStorageAccounts>100</MaxStorageAccounts>
      <MaxHostedServices>20</MaxHostedServices>
      <CurrentCoreCount>1</CurrentCoreCount>
      <CurrentHostedServices>1</CurrentHostedServices>
      <CurrentStorageAccounts>1</CurrentStorageAccounts>
      <MaxVirtualNetworkSites>50</MaxVirtualNetworkSites>
      <MaxLocalNetworkSites>20</MaxLocalNetworkSites>
      <MaxDnsServers>20</MaxDnsServers>
      <OfferCategories>Azure_Platform_All;Azure_Paid;Azure_Consumption;Azure_MSPP;Azure_Credit;Azure_MS-AZR-0025P;Individual</OfferCategories>
      <MaxExtraVIPCount>-1</MaxExtraVIPCount>
      <AADTenantID>XXXXXXXXXXXXXXX</AADTenantID>
      <CreatedTime>2015-07-27T22:54:39Z</CreatedTime>
   </Subscription>
   <Subscription>
      <SubscriptionID>XXXXXXXXXXXXXXX</SubscriptionID>
      <SubscriptionName>Pay-As-You-Go</SubscriptionName>
      <SubscriptionStatus>Disabled</SubscriptionStatus>
      <AccountAdminLiveEmailId>JGrote@XXXXXXXXXXXXXXX.net</AccountAdminLiveEmailId>
      <ServiceAdminLiveEmailId>JGrote@XXXXXXXXXXXXXXX.net</ServiceAdminLiveEmailId>
      <MaxCoreCount>20</MaxCoreCount>
      <MaxStorageAccounts>100</MaxStorageAccounts>
      <MaxHostedServices>20</MaxHostedServices>
      <CurrentCoreCount>0</CurrentCoreCount>
      <CurrentHostedServices>0</CurrentHostedServices>
      <CurrentStorageAccounts>0</CurrentStorageAccounts>
      <MaxVirtualNetworkSites>50</MaxVirtualNetworkSites>
      <MaxLocalNetworkSites>20</MaxLocalNetworkSites>
      <MaxDnsServers>20</MaxDnsServers>
      <OfferCategories>Azure_Platform_All;Azure_Direct;Azure_Paid;Azure_Consumption;Azure_MS-AZR-0003P;Individual</OfferCategories>
      <MaxExtraVIPCount>-1</MaxExtraVIPCount>
      <AADTenantID>XXXXXXXXXXXXXXX</AADTenantID>
      <CreatedTime>2015-08-21T17:12:00Z</CreatedTime>
   </Subscription>
</Subscriptions>

Thanks.

JustinGrote commented 9 years ago

One other thing I can think of is that this account has both a Microsoft account and Organizational account on the same email address, while the working one is org only. I was sure to ensure I was logging in with my organizational account and not the Microsoft account, but maybe the subscription check step doesn't distinguish.

alstab commented 9 years ago

Hi Justin, I think I actually came across this problem myself recently and fixed it. I'll get you a build with the changes and we can see if it works for you. Quick question -- does the subscription that it autoselects have any automation accounts? If it does, does the add-on download them correctly?

JustinGrote commented 9 years ago

I can check it out from a branch in Git if you define to test.

The subscription is just the first in the list (azure active directory) and does not have any automation accounts. The one I want is the second in the list of the XML response (Microsoft Partner Network)

alstab commented 9 years ago

Cool, that would be helpful. Just get the latest code in master and it should be fixed (master is currently somewhat ahead of 0.2.2.9, the most recent release on PS Gallery).

JustinGrote commented 9 years ago

Err don't have VS set up on my current test machine, my bad. No biggie, I'll check it at next build. Thanks for the fast response and resolution!

On Thu, Nov 19, 2015 at 2:46 PM alstab notifications@github.com wrote:

Cool, that would be helpful. Just get the latest code in master and it should be fixed (master is currently somewhat ahead of 0.2.2.9, the most recent release on PS Gallery).

— Reply to this email directly or view it on GitHub https://github.com/azureautomation/azure-automation-ise-addon/issues/87#issuecomment-158224592 .

alstab commented 9 years ago

No problem Justin, I hope this works! Try the latest build on PS Gallery (0.2.3): https://www.powershellgallery.com/packages/AzureAutomationAuthoringToolkit/

JustinGrote commented 9 years ago

Fixed it. Thanks!

On Thu, Nov 19, 2015 at 9:55 PM alstab notifications@github.com wrote:

No problem Justin, I hope this works! Try the latest build on PS Gallery: https://www.powershellgallery.com/packages/AzureAutomationAuthoringToolkit/

— Reply to this email directly or view it on GitHub https://github.com/azureautomation/azure-automation-ise-addon/issues/87#issuecomment-158290264 .

alstab commented 9 years ago

Great to hear, thanks for letting us know!