Saturday, 28 March 2015

Bulk Remove Azure Active Directory User and Group Using Powershell

 

[Scenario]

  • Using Azure Active Directory
  • Has used AAD Sync to sync on-premise user account and group
  • Discovered has accidently sync user account and group to Azure Active Directory but require to remove it.

It’s quite a painful experience to delete each individual user account and group from Azure Management Portal. Wonder why no multiple select option and quite annoying when it asking for confirmation and refresh. But lucky enough got powershell to do the job.

[Pre-requisite]

[ Configuration]

After install the pre-requisite, open the Azure Active Directory Module for Windows Powershell.

Connect to Azure Active Directory by entering the Global Administrator account.

$msolcred = get-credential
connect-msolservice -credential $msolcred

Export the user account to csv file format





Get-MsolUser –All | Export-CSV C:\users.csv

Open the csv file and remove the Microsoft account and Global Administrator account. We just want to remove others account and retain the Global administrator account.


Export the group to csv file format





Get-MsolGroup –All | Export-CSV C:\Groups.csv

Final step is start to remove bulk users account and groups


Remove Users





Import-CSV C:\Users.csv | Remove-MsOlUser –Force

Remove Groups





Import-CSV C:\Groups.csv | Remove-MsOlGroup –Force

Deletion process is quite long period if you’ve more than 8000 records.

Tuesday, 3 March 2015

Azure Active Directory Access Panel on Google Play Store

 

The Access Panel is a web based portal that allows an end user with an organization account in Azure Active Directory to view and launch cloud based application to which they have been granted access by the Azure AD administrator. You can view the portal from this link.

Some of you may prefer to access from android devices compare to use browser and may curious if an app is available on Google Play Store. Well, the answer is “Yes”. Microsoft has released an app called “My Apps Azure Active Directory”.

image

To download, click here

Let have a quick walkthrough on the app.

1. Sign in using Azure AD Account. Once key in your user account, page will changed to company branding page.

Screenshot_2015-03-03-17-45-10

2. Once authenticated, you able to access and view your application.

Screenshot_2015-03-03-17-45-33

3. Click on the application and you’ll redirected without enter your password as SSO has kicked in.

To navigate back to your application, you need to click on “My Apps” logo. A bit not user friendly since user may find it difficult to locate. Probably the best is add a HOME button, what do you think? Give it a try and provide feedback at Google Play Store to improve the application.