Skip to content

Commit beaaacf

Browse files
refactor: Remove Power BI API permissions configuration and access check from deployment workflow
1 parent ff47a00 commit beaaacf

1 file changed

Lines changed: 1 addition & 46 deletions

File tree

.github/workflows/azure-dev.yml

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -55,54 +55,9 @@ jobs:
5555
SP_OBJECT_ID=$(az ad sp show --id ${{ vars.AZURE_CLIENT_ID }} --query id -o tsv)
5656
echo "principalId=$SP_OBJECT_ID" >> $GITHUB_ENV
5757
echo "Service Principal Object ID: $SP_OBJECT_ID"
58-
- name: Configure Power BI API Permissions
59-
id: configure-powerbi
60-
continue-on-error: true
61-
run: |
62-
echo "Adding Power BI API permissions to service principal..."
63-
64-
# Power BI Service App ID (well-known)
65-
POWERBI_APP_ID="00000009-0000-0000-c000-000000000000"
66-
67-
# Get the app object ID
68-
APP_OBJECT_ID=$(az ad app show --id ${{ vars.AZURE_CLIENT_ID }} --query id -o tsv)
69-
70-
# Add Tenant.Read.All permission (Role ID from Power BI API)
71-
az ad app permission add \
72-
--id $APP_OBJECT_ID \
73-
--api $POWERBI_APP_ID \
74-
--api-permissions b2f1b2fa-f35c-407c-979c-a858a808ba85=Scope \
75-
2>/dev/null || echo "Permission may already exist"
76-
77-
# Add Workspace.ReadWrite.All permission
78-
az ad app permission add \
79-
--id $APP_OBJECT_ID \
80-
--api $POWERBI_APP_ID \
81-
--api-permissions 7504609f-c495-4c64-8542-686125a5a36f=Scope \
82-
2>/dev/null || echo "Permission may already exist"
83-
84-
# Grant admin consent (requires admin privileges)
85-
az ad app permission admin-consent --id $APP_OBJECT_ID 2>/dev/null || \
86-
echo "⚠️ Admin consent required. Grant manually in Azure Portal if Fabric setup fails."
87-
88-
echo "Power BI API permissions configured"
89-
- name: Check Power BI API Access
90-
id: check-powerbi
91-
continue-on-error: true
92-
run: |
93-
echo "Testing Power BI API access..."
94-
TOKEN=$(az account get-access-token --resource https://analysis.windows.net/powerbi/api --query accessToken -o tsv 2>/dev/null)
95-
if [ -n "$TOKEN" ] && [ "$TOKEN" != "null" ]; then
96-
echo "powerbi_access=true" >> $GITHUB_OUTPUT
97-
echo "✓ Power BI API access confirmed"
98-
else
99-
echo "powerbi_access=false" >> $GITHUB_OUTPUT
100-
echo "⚠️ Power BI API access not available. Fabric workspace automation will be skipped."
101-
echo " To enable: Grant Power BI API permissions and admin consent to the service principal."
102-
fi
10358
- name: Provision Infrastructure
10459
run: azd provision --no-prompt
10560
env:
10661
AZD_INITIAL_ENVIRONMENT_CONFIG: ${{ secrets.AZD_INITIAL_ENVIRONMENT_CONFIG }}
10762
principalType: 'ServicePrincipal'
108-
fabricWorkspaceMode: ${{ steps.check-powerbi.outputs.powerbi_access == 'true' && 'create' || 'skip' }}
63+
fabricWorkspaceMode: 'skip'

0 commit comments

Comments
 (0)