Workload Identity Federation Preview #884
Replies: 4 comments 10 replies
-
This is HUGE and works perfectly for tasks which invoke the service connection directly. For one of my use cases, however, I'm running # azure-pipelines.yml
- task: Bash@3
displayName: Deploy solutions
inputs:
filePath: 'deploySolutions.sh'
env:
url: $(PP_ENV_URL)
envName: $(PP_ENV_NAME)
applicationId: $(CLIENT_ID)
tenant: $(TENANT)
PAC_ADO_ID_TOKEN_REQUEST_TOKEN: $(PAC_ADO_ID_TOKEN_REQUEST_TOKEN)
PAC_ADO_ID_TOKEN_REQUEST_URL: $(PAC_ADO_ID_TOKEN_REQUEST_URL) # deploySolutions.sh
pac auth create --url $url --name $envName --applicationId $applicationId --tenant $tenant --azureDevOpsFederated What am I missing? |
Beta Was this translation helpful? Give feedback.
-
We have started to move over to using the Workload Identity federation. Noticed an issue using the # yaml
- task: PowerPlatformSetConnectionVariables@2
displayName: 'Get Service Principal Credentials'
name: SP_credentials
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: ${{ parameters.SPN }}
Not something we've seen before and replicated it on both pipelines where we'd updated the Service Connection to use WIF Other tasks using the SPN worked with no issue. |
Beta Was this translation helpful? Give feedback.
-
Dropping this here, for anyone else looking for how to find the "AzureDevOpsOrganizationID" value (courtesy of @tehcrashxor) #916 (comment)
|
Beta Was this translation helpful? Give feedback.
-
How federated credentials can be utilized with GitHub Actions was not very clear from the documentation, but it seems to be pretty straight forward with the right setup. I'm just putting this here in case someone else struggle to understand the documentation for this like I did; eventually finding themselves at this discussion. The permissions section of the GH-action needs to be set for the id-token to be updated: permissions:
id-token: write Omitting the client-secret from the steps, is all that is needed for federated authentication to be used:
- name: Install PAC
uses: microsoft/powerplatform-actions/actions-install@v1
with:
add-tools-to-path: true
- name: who-am-i action
uses: microsoft/powerplatform-actions/who-am-i@v1
with:
environment-url: ${{ env.DATAVERSE_ENVIRONMENT_URL }}
app-id: ${{ env.CLIENT_ID }}
tenant-id: ${{ env.TENANT_ID }}
# client-secret: ${{ secrets.CLIENT_SECRET }} # <-- Removing this seems to be sufficient. |
Beta Was this translation helpful? Give feedback.
-
With the release of Power Platform Build Tools v2.0.69 and its underlying PAC v1.32.6, Service Principals can now authenticate with OpenID Connect (OIDC), federated with Azure DevOps . This enables the removal of Service Connections with Client Secrets.
To use this new option:
Add Federated Credentials to the App Registration
https://vstoken.dev.azure.com/[AzureDevOpsOrganizationID]
sc://[AzureDevOpsOrganizationName]/[AzureDevOpsProjectName]/[AzureDevOpsServiceConnectionName]
Beta Was this translation helpful? Give feedback.
All reactions