How do I remove or rename a Bluemix organization after a name change? - ibm-cloud

I try to remove my organization executing this command:
1) Change the original organization name from miguel#thingtrack.com to Miguel correctly from the Dashboard.
1) Login in my bluemix account correctly from CLI like this:
bluemix login
2) Try to remove my unique organization called Miguel:
bluemix iam org-delete Miguel
The error result is:
Suprimiendo la organización Miguel como miguel#thingtrack.com...
FAILED
Error response from server. StatusCode: 500; description: multiple documents found containing guid 7f1f9939-b0bc-4e61-85b9-d7e3744b6c77: [{"_id":"org.Miguel","_rev":"3-9b1bba6c8f8c618ba424c728e55ee247","customer":"ibm","deployment":"yp","name":"Miguel","type":"org","value":{"ibm:yp:eu-gb":{"guid":"6b7219e6-5992-4d43-ac52-083bf0ce8d50","owner":true},"ibm:yp:us-south":{"guid":"7f1f9939-b0bc-4e61-85b9-d7e3744b6c77"}},"created_at":"2016-05-23T13:49:36.660Z","updated_at":"2016-09-09T17:50:02.846Z","migrated":true},{"_id":"org.miguel#thingtrack.com","_rev":"2-cf26e55555fe9730b4a9a9a4525f4bf3","customer":"ibm","deployment":"yp","name":"miguel#thingtrack.com","type":"org","value":{"ibm:yp:us-south":{"guid":"7f1f9939-b0bc-4e61-85b9-d7e3744b6c77","owner":true}},"created_at":"2015-08-28T09:49:49.221Z","updated_at":"2016-08-13T18:06:03.994Z","migrated":true}]
Also I noticed that if I try to rename again the organization to other name I obtain the same error.
So in my opinion if you change the organization name one time, you will never remove it or change the name never more.
Is it a bug of bluemix??
Regards

Bluemix does not allow users to delete organizations. Per documentation you have to contact Bluemix Support team to delete the organization on your behalf.
From Bluemix documentation:
You must contact Bluemix Support to delete an organization. When you
request for the support team to delete an organization, all the
spaces, applications, and services within the organization are
deleted.
You can find more details here: https://console.ng.bluemix.net/docs/admin/orgs_spaces.html#orginfo

Actually, Miguel Salinas is correct. You can now rename or delete orgs from the Bluemix CLI using commands such as:
bluemix iam org-rename <old_org_name> <new_org_name>
bluemix iam org-delete <org_name>
Here's the reference to the bluemix commands:
https://www.ng.bluemix.net/docs/cli/reference/bluemix_cli/index.html
The documentation snippet mentioned above by Alex is outdated and need to be revised. I'll send them this feedback.

I know I am late to the party, but I hope this helps the future users.
You can rename org using the bluemix cli as #marcel Ribas stated above.
bluemix iam org-rename old_org_name new_org_name
bluemix iam org-delete org_name
Alternatively you can go into your bluemix account and you have and option to change org name under the manange organizations tab. Just click on edit button next to org name and make the changes
Note- You need to have manager level access to the org you are trying to rename. You can check this on your bluemix account under the manage organizations tab

Related

Connect amplify to github enterprise

We are trying to create an AWS amplify app. For CI/CD we want to integrate it with Github. I understand amplify has a way to add a Github account(personal with username and password), but I am not able to find a way to add a Github Enterprise account( that doesn't have such username and password credentials).
Is there a way to add Github enterprise to amplify, like how Codebuild allows to connect.
A GHE (GitHub Enterprise) server does support GitHub Actions
So check first if activating an action like amplify-cli-action or (depending on what you want to do) amplify-preview-actions would help in your case.
In term of credentials, those actions would need:
Navigate to AWS Identity and Access Management console
Under Users -> Add New User. Fill in the user name(GithubCI) and set Programmatic Access for Access type.
In permissions, select Create a new group, in a dropdown select Create policy.
In a policy creation menu, select JSON tab and fill it with a next policy statement, then hit review and save

How to get access to an Azure DevOpps Organization

I cannot create a new organization named ''OnLineO'', as this name already exists.
I'm about sure it's me who created it a few time ago, but none of my logons run.
Must I send an email to Visual Studio Marketplace (VSMarketplace#microsoft.com) as stated in this post : Recovering access to an organization ?
Through the query, I found that your organization:"OnLineO" has been backed up to AAD:"OnLineO".
Please go to azure DevOps profile page,switch to OnLineO domain and try to login. Please do this in the new incognito window of browser. Note that your login account also needs to be backed up to AAD.
If you still cannot log in, please provide vsid as shown below. Pay attention to the processing of personal privacy information.
Sorry for the delay. If organization OnLineO is backed up to AAD "OnLineO", this is a great info, but I don't understand what it means... ?
On my DevOps profile page in an Invited session in Chrome (more isolated than incognito in other browsers), I am switched to OnLineO
DevOps profile page
It's when I try to create OnLineO as a New Organization that I get this message :
New Organization

How to detach, unlink, clear, remove, or rollback VSTS connection to Azure AD

There are good instructions available here on changing the VSTS connection from one Azure AD to another: Change VSTS AD.
But what if you just want to remove the Azure AD integration, and just revert to using Microsoft Accounts?
I successfully performed all the steps in the instruction, up to the point of attaching a new target Azure AD. You'd think when the VSTS account was unlinked in Azure, it would no longer show up in VSTS.
But going to https://[AccountName].visualstudio.com/_admin/_home/settings still shows account being backed by the source directory.
Attempting to add a Microsoft Account based user at https://[AccountName].visualstudio.com/_user fails to find the account, presumably because it is looking the the Source Azure AD.
This is an important capability when transferring ownership of an account. Thanks for taking a look!
You can follow the steps here: Disconnect your Team Services account from Azure AD.
To stop using Azure AD and revert to using Microsoft accounts, you can
disconnect your Team Services account from its directory.
Here's what you'll need:
Microsoft accounts added to your Team Services account for all users.
Team Services account owner permissions for your Microsoft account.
Directory membership for your Microsoft account as an external user
and global administrator permissions. Azure AD members can't
disconnect Team Services accounts from directories.
With the help of Microsoft Premium Support, we did manage to get this worked out.
The problem was the Team Services was not disconnected from the associated Azure AD before it was unlinked. Then once it was unlinked, it appeared gone from Azure, leaving no way to disassociate Azure AD.
The documentation does show to first disconnect the VSTS account from Azure AD, and then “unlink” the account. Where I got into trouble was by using the new portal. It's pretty hard to even find the old portal anymore BTW).
The new portal has this nice handy unlink button, which is practically irresistible. If clicking it, then it declares success. There is nothing in the UI that prevents you from unlinking while still leaving the AD association. There is no option at all in the new UI portal, as far as I could find, to disconnect Team Services from Azure AD.
Once unlinked, the only fix is to relink, and then redo it all in the old portal as is indicated by the documentation.
This is much more difficult than it should be because it seems like something that should be simple to achieve through the web UI. These posts helped me, but I wanted to add my 2 cents:
In order to disconnect VSTS from AAD you need to be able to use the disconnect button on the configure tab in the old portal seen here. However, you can only use that button if you're the VSTS account owner and if your account is not sourced from the currently linked active directory (i.e. - a MS Account). But you can't make the VSTS account owner a MS account if you've used the portal's interface to add the MS Account to your AAD as an external user. This is because external users are added as Guest account type by default (rather than Member type). If you try to set the MS account as VSTS owner you get the "AAD guest users are not allowed to be collection owners" message seen here.
It's a chicken/egg thing which is made more difficult by the fact that the official documents for this process make no mention of the conflict you'll face. They read as if this should just work.
The answer is that (as of today) you can't do this without using Powershell or an AAD API to convert the MS Account from a "Guest" to a "Member" user type. There are a number or articles out there which walk through the older APIs to do this. Here is what I did with the latest PS:
First, log in to the directory you wish to unlink with an account which has permissions to modify members. Ideally an admin or owner.
Connect-AzureAD
Next, find the account you want to modify using this command:
Get-AzureADUser
Find the ObjectID of the user you want to convert from Guest to Member and then run this command:
Set-AzureADUser -ObjectId [ObjectID GUID Here] -UserType Member
This will convert the MS Account in the AAD you want to unlink to a 'member' type. In my situation I found that I had to remove the MS Account from VSTS and re-add it in order to trigger a refresh which allowed me to set it as account owner.
Now you just follow the documented steps:
set MS account as project owner. Save.
log in to old portal, go to configure tab, and disconnect
log back in everywhere to see the changes

Creating an organization in Bluemix

I am currently part of several organizations, which I have been previously invited to. I would like to create a new organization solely for myself. According to the documentation (https://www.ng.bluemix.net/docs/admin/index.html#orgmng) I should be able to go to 'Manage Organizations' and click 'Create an organization', but I do not have this option. How should I go about creating an organization?
For the public version of Bluemix Trial accounts can only create one organisation (which is created the first time you log in). If you add credit card details and move to a "PayGo" account then you are able to create multiple organisations.
On the dedicated or local deployments of Bluemix all admins are given the permissions to create their own organisations.
Only account owners with Pay-As-You-Go accounts can create an organization. You can create an organization by completing the following steps:
Using Bluemix Web GUI:
Click Account > Manage Organizations page.
Click Add a New Org.
Enter the org name.
Click Add.
Using Bluemix admin CLI
- cf ba create-organization <organization> <manager>
Where
<organization>: The name or GUID of the Bluemix org to add.
<manager>: The user name of the manager for the org.

How to find my own organization id?

In many of the APIs for Bluemix, I need to know my "organization id" which I believe to be different from the "name" of my organization. When I login to the Bluemix dashboard, I am unable to find my organization id value. What is the recommended set of steps to determine my own organization id value?
You can use the cf command line tool for this:
$ cf org <org-name> --guid
You can also see it in the Bluemix dashboard browser URL, like for example (I modified mine below for security reasons):
https://console.ng.bluemix.net/?direct=classic/#/resources/cloudOEPaneId=resources&orgGuid=xxxxxxxx-8afc-4b2f-afb5-dc7d77dd0baa&spaceGuid=xxxxxxx-2c29-4d8a-9e97-06aed