Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Unable to register subscriptions using Organizational Account #42

Open
davidmginn opened this issue Nov 2, 2016 · 2 comments
Open

Unable to register subscriptions using Organizational Account #42

davidmginn opened this issue Nov 2, 2016 · 2 comments

Comments

@davidmginn
Copy link

I have this tool successfully setup and I am able to register new subscriptions using an MSA, however the below line fails in the GetUserSubscriptions method in AzureResourceManagerUtils

AuthenticationResult result = authContext.AcquireTokenSilent(ConfigurationManager.AppSettings["ida:AzureResourceManagerIdentifier"],
credential, new UserIdentifier(signedInUserUniqueName, UserIdentifierType.RequiredDisplayableId));

The exception message that is received states "Failed to acquire token silently. Call method AcquireToken", to which I have changed the above method to do. It no longer fails on that point, however it also is unable to return back the list of available subscriptions for the logged in user, despite returning three Organizations that each have subscriptions in them.

Has anyone else experienced a similar issue?

@mustafakasap
Copy link
Contributor

At the time of development there were no support to handle multi factor authentication (or 2FA) within the authentication libs used. If your org requires SMS, mobile phone text etc. like additional authentiacation layer, than this may be the reason for the issue. As I know new version of the authentication lib allows MFA and this lines needs to be updated.

@KarthikKottiswaran
Copy link

I have pushed this project to Azure and successfully able to Register using the Registration webapp. But the SPN I created is not pulling my subscription details. The SPN has a contributor role at the subscription level. Could me you help identify what I am doing wrong?
Annotation 2020-05-11 170454

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants