Giter VIP home page Giter VIP logo

aadconsolidation's Introduction

Azure AD Consolidation

Introduction

The purpose of this project is to migrate all the subscriptions owned by the European Commission to a single tenant in order to facilitate the management and governance of the accounts.

Code Repository

The code repository contains 2 files:

  • source.sh
  • target.ps1

The first one, source.sh, is a cli script intended to be run on the source account which will create an archive containing all the information to be transfered. This archive can then be downloaded and uploaded to the destination account.

The second one, target.ps1, is a PowerShell script intended to be run on the target account which will recreate all the Azure assets existing in the source account based on the information provided by the shared archive.

Procedure

Source account

In the source account, open a new shell session and ensure the Azure Shell is using cli.

This is a alt text.

If the Azure Shell uses PowerShell by default, click on the switch button to switch to Azure CLI.

This is a alt text.

In Azure CLI, run the following code (optionnaly use the --subscription parameter to perform the backup for a specific subscription):

curl https://raw.githubusercontent.com/digitc1/aadconsolidation/main/src/source.sh --output script.sh
chmod +x script.sh
az login --tenant [TENANT_ID]
./script.sh [--subscription contoso]
rm script.sh

Once the script completed, click on the download button and enter the name "aadmigration.tar.gz" to download the archive containing all the information related to your account. This archive must be kept carefully as it will be the only way to recover all the information related to the old account (RBAC, applications, ...).

This is a alt text.

This is a alt text.

This is a alt text.

Target account

In the target account, open a new shell session and ensure the Azure Shell is using PowerShell.

This is a alt text.

If the Azure Shell uses CLI by default, click on the switch button to switch to Azure PowerShell.

This is a alt text.

Upload the archive created by running the script on the source account

In Azure Shell, run the following code:

Invoke-WebRequest -URI https://raw.githubusercontent.com/digitc1/aadconsolidation/main/src/target.ps1 -OutFile script.ps1
Connect-AzureAD -tenant [TENANT_ID]
Connect-AzAccount -UseDeviceAuthentication -tenant [TENANT_ID]
az login --tenant [TENANT_ID]
./script.ps1
rm script.ps1

Frequently Asked Questions

Check our Frequently Asked Questions for additional information.

Contribute

These scripts have been created by European Commission (DIGIT) and Microsoft and are intended to be used by the European Commission only.

To contribute to the code, contact DIGIT CLOUD VIRTUAL TASK FORCE functional mailbox.

aadconsolidation's People

Contributors

lashegu avatar augustincolle-digit avatar physc avatar amolp-msft avatar nicolaskp-ec avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.