Connect Azure DevOps with Microsoft Entra ID
To enable users to work with a remote Git repository that is hosted on Microsoft Azure Repos:
-
Set up an application in Microsoft Entra ID.
-
Apply the Microsoft Entra ID App Secret.
|
Microsoft Entra ID replaces the deprecated Azure DevOps OAuth 2.0 application, which no longer accepts new registrations. If you have an existing Azure DevOps OAuth app, migrate to Microsoft Entra ID. |
Create a Microsoft Entra ID application for Che
Create a Microsoft Entra ID application so that Che can authenticate your developers and provide credential-free access to Azure DevOps repositories.
-
You are logged in to Microsoft Azure DevOps Services.
Third-party application access via OAuthis enabled for your organization. See Change application connection & security policies for your organization.Procedure-
Register an application in Microsoft Entra ID. See Register an application.
-
Add the Authorization callback URL
https://<che_fqdn>/api/oauth/callbackto your application. See Add a redirect URI. -
Add a client secret to your application. See Add credentials.
-
Add the Azure DevOps
vso.code_writepermission to the client application. See Add permissions to access your web API. -
Connect your Azure DevOps organization to Microsoft Entra ID. See Connect your organization to Microsoft Entra ID.
-
Connect Che to your Microsoft Entra ID application
Connect Che to your Microsoft Entra ID application so that developers can access Azure DevOps repositories from workspaces without re-entering credentials.
-
You have configured the Microsoft Entra ID OAuth App.
-
You have the following values, which were generated when configuring the Microsoft Entra ID OAuth App:
-
Application (client) ID
-
Directory (tenant) ID
-
Client Secret
-
-
An active
kubectlsession with administrative permissions to the destination Kubernetes cluster. See Overview of kubectl.
-
Prepare the Secret:
kind: Secret apiVersion: v1 metadata: name: azure-devops-oauth-config namespace: eclipse-che(1) labels: app.kubernetes.io/part-of: che.eclipse.org app.kubernetes.io/component: oauth-scm-configuration annotations: che.eclipse.org/oauth-scm-server: azure-devops type: Opaque stringData: tenant-id: <Microsoft_Entra_ID_Tenant_ID>(2) id: <Microsoft_Entra_ID_App_ID>(3) secret: <Microsoft_Entra_ID_Client_Secret>(4)1 The Che namespace. The default is eclipse-che.2 The Microsoft Entra ID Directory (tenant) ID. 3 The Microsoft Entra ID Application (client) ID. 4 The Microsoft Entra ID Client Secret. -
Apply the Secret:
$ kubectl apply -f - <<EOF <Secret_prepared_in_the_previous_step> EOF
-
Verify that the output displays
secret/azure-devops-oauth-config created. -
Verify that the rollout of the Che server components is complete:
$ kubectl rollout status deployment/che -n eclipse-che