Showing posts with label New-AzureADGroup. Show all posts
Showing posts with label New-AzureADGroup. Show all posts

Tuesday, 9 February 2021

Create User Group in Azure using Azure CLI (powershell)

Steps1 - Login to the azure account with  right account with azure AD access. 

Step 2 - Open CloudShell by clicking the icon on the top right corner.

Step 3 - You'll need to associate CLI session with a Storage account. So follow the instruction and connect with the storage account. 

Step 4 - Select the PowerShell in the dropdown window 

You'll see something like this screenshot:

Step 5 - type the below command and press enter:

 PS /home/sanjeeb> Connect-AzureAd

 Step 6 - type the below code (change the group name as your need):

PS /home/sanjeeb>New-AzureADGroup -Description "siteadmingroup" -DisplayName "siteadmingroup" -MailEnabled $false -SecurityEnabled $true -MailNickName "siteadmingroup"

On success, you'll see the object id like below: 

ObjectId                             DisplayName             Description

--------                             -----------             -----------

daf23147-8123-dc23-bsb8-d2d2a5224271 siteadmingroup siteadmingroup

How to give SQL User access to execute Stored procedures and read/write access to database

Assumptions: stored procedures and tables are created under schema dbo. in case different schema, change the below code accordingly.   --Cre...