Skip to content

Commit

Permalink
updated exec perm for mi (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
santhoshb-msft authored Mar 29, 2024
1 parent fa0fcdd commit fd62eea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deployment/Deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ $dbaccesstoken = (Get-AzAccessToken -ResourceUrl https://database.windows.net).T
Invoke-Sqlcmd -InputFile ./script.sql -ServerInstance $ServerUri -database $SQLDatabaseName -AccessToken $dbaccesstoken

Write-host " ➡️ Execute SQL script to Add WebApps"
$AddAppsIdsToDB = "CREATE USER [$WebAppNameAdmin] FROM EXTERNAL PROVIDER;ALTER ROLE db_datareader ADD MEMBER [$WebAppNameAdmin];ALTER ROLE db_datawriter ADD MEMBER [$WebAppNameAdmin];CREATE USER [$WebAppNamePortal] FROM EXTERNAL PROVIDER;ALTER ROLE db_datareader ADD MEMBER [$WebAppNamePortal];ALTER ROLE db_datawriter ADD MEMBER [$WebAppNamePortal];"
$AddAppsIdsToDB = "CREATE USER [$WebAppNameAdmin] FROM EXTERNAL PROVIDER;ALTER ROLE db_datareader ADD MEMBER [$WebAppNameAdmin];ALTER ROLE db_datawriter ADD MEMBER [$WebAppNameAdmin]; GRANT EXEC TO [$WebAppNameAdmin]; CREATE USER [$WebAppNamePortal] FROM EXTERNAL PROVIDER;ALTER ROLE db_datareader ADD MEMBER [$WebAppNamePortal];ALTER ROLE db_datawriter ADD MEMBER [$WebAppNamePortal]; GRANT EXEC TO [$WebAppNamePortal];"
Invoke-Sqlcmd -Query $AddAppsIdsToDB -ServerInstance $ServerUri -database $SQLDatabaseName -AccessToken $dbaccesstoken

Write-host " 🔵 Deploy Code to Admin Portal"
Expand Down

0 comments on commit fd62eea

Please sign in to comment.