Introduction
Problem
After enabling SSO/SAML (e.g., Azure ADO, GitHub SSO, GitLab SAML) on user's Version Control System (VCS), the Terraform Cloud integration with the VCS stops working. Workspaces may no longer trigger runs, or you may encounter errors while accessing repositories.
Cause
When SSO/SAML is enforced on the VCS side, previously authorized tokens (used to link Terraform Cloud with your VCS) may become invalid or restricted due to missing user permissions or reauthorization requirements.
Terraform Cloud relies on a user-authenticated OAuth token to access your repositories. If that user is no longer compliant with the updated SSO/SAML settings, the integration will fail.
Solutions:
To resolve the issue:
-
Navigate to Terraform Cloud:
- Go to your Terraform Cloud organization settings.
- Visit "Providers" > "Version Control".
-
Reauthorize the VCS Integration:
- Click "Reauthorize" in the affected VCS connection.
- You must log in with a user who:
- Has access to the VCS organization.
- Has completed the SSO/SAML setup successfully on the VCS platform.
- Has permission to access the required repositories.
-
Save and Test:
- After reauthorization, trigger a new run by pushing a commit in the connected repository to a workspace to verify the fix.