Solutions for common CSV import issues in Veza
id or name (or both){
"csv_data": "abc123="
}CSV_PAYLOAD=$(cat my_app_data.csv | base64)
curl --location https://example.vezacloud.com/api/v1/providers/custom/40bdd318-d320-4574-be90-ca556d59889a/datasources/9bc29dc6-8cd0-4926-992e-7d720305ae2f:push_csv \
--request POST \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $VEZA_API_KEY" \
--data "{\"csv_data\": \"${CSV_PAYLOAD}\"}"#!/usr/bin/env python3
import base64
import json
import os
import sys
import oaaclient.utils as oaautils
from oaaclient.client import OAAClient, OAAClientError
veza_url = "https://example.vezacloud.com"
veza_api_key = os.getenv("VEZA_API_KEY")
provider_id = "UUID of Provider"
data_source_id = "UUID of Data Source"
source_csv = "path/to/my_file.csv"
print("Connecting to Veza")
try:
veza_con = OAAClient(veza_url, veza_api_key)
except OAAClientError as e:
print("Error connecting to Veza tenant")
print(e)
sys.exit(1)
print("Loading CSV file")
with open(source_csv, "rb") as f:
encoded_csv = base64.b64encode(f.read())
print("Pushing data to Veza")
try:
push_request = {"id": provider_id, "data_source_id": data_source_id, "csv_data": encoded_csv.decode()}
veza_con.api_post(f"/api/v1/providers/custom/{provider_id}/datasources/{data_source_id}:push_csv", push_request)
print("Push succeeded")
except OAAClientError as e:
log.error(f"{e.error}: {e.message} ({e.status_code})")
if hasattr(e, "details"):
for d in e.details:
log.error(d)
sys.exit(3)
Common patterns for importing identity and permissions metadata from CSV files
UUID_GENERATORNOW
{first_name} {last_name}{username}@example.com{employee_id | ZERO_PAD, 8}user_id,name,email,active
B001,Boolean Example 1,[email protected],true
B002,Boolean Example 2,[email protected],t
B003,Boolean Example 3,[email protected],yes
B004,Boolean Example 4,[email protected],y
B005,Boolean Example 5,[email protected],1
B006,Boolean Example 6,[email protected],active
B007,Boolean Example 7,[email protected],enabled
B008,Boolean Example 8,[email protected],false
B009,Boolean Example 9,[email protected],f
B010,Boolean Example 10,[email protected],no
B011,Boolean Example 11,[email protected],n
B012,Boolean Example 12,[email protected],0
B013,Boolean Example 13,[email protected],inactive
B014,Boolean Example 14,[email protected],disableduser_id,name,email,active,department,title,office_location,hire_date,employee_type,salary_band,performance_rating,certification,languages,project_ids,manager_id,emergency_contact
CP001,Custom Property Example 1,[email protected],true,Engineering,Senior Developer,New York,2023-01-15,Full-time,B4,Exceeds Expectations,"AWS Certified, Azure Expert","Java, Python, Go","PROJ-001, PROJ-002",MGR-101,John Smith (555-123-4567)
CP002,Custom Property Example 2,[email protected],true,Marketing,Marketing Manager,San Francisco,2022-05-10,Full-time,C2,Meets Expectations,Google Analytics,"English, Spanish",PROJ-003,MGR-102,Mary Johnson (555-987-6543)
CP003,Custom Property Example 3,[email protected],false,Finance,Financial Analyst,Chicago,2023-08-22,Contract,A3,Needs Improvement,CPA,"English, French","PROJ-004, PROJ-005, PROJ-006",MGR-103,Robert Davis (555-456-7890)user_id,user_name,role_name,role_owner,role_owner_type
10001,bob,admin,[email protected],,oktauser
10002,sue,admin,[email protected],oktauser
10003,marry,user,[email protected],oktauser
10004,jane,user,[email protected],oktauser
10005,sam,viewer,[email protected],oktauser
10006,adam,viewer,[email protected],oktauser
10007,brett,ops,[email protected],oktauser
10008,robert,ops,[email protected],oktauser
10009,chris,manager,,
10010,nick,manager,,employee_id,display_name,email_address,account_status,join_date,last_access,password_updated,termination_date,groups,roles
EMP001,Alex Johnson,[email protected],active,2023-04-15,2025-02-15T09:30:45Z,2024-11-10T08:15:30Z,,"Engineering, DevOps","Developer, System Administrator"
EMP002,Taylor Smith,[email protected],true,2022-09-20,2025-03-01T11:45:20Z,2024-10-05T14:30:15Z,,"Product, UX Research","Product Manager, UX Designer"
EMP003,Jordan Lee,[email protected],inactive,2021-11-05,2024-10-10T16:20:30Z,2024-06-15T09:45:10Z,2025-01-15,"Marketing, Content","Content Creator, Social Media Manager"
EMP004,Casey Morgan,[email protected],1,2023-08-22,2025-02-28T15:10:25Z,2024-12-20T10:30:45Z,,"Finance, Accounting","Financial Analyst, Auditor"
EMP005,Riley Brown,[email protected],0,2022-03-10,2024-11-15T08:45:30Z,2024-08-05T11:20:15Z,2024-12-31,"HR, Recruiting","HR Specialist, Talent Acquisition"user_id,groups,roles
user1,"Engineering, QA Team, Product Team","Software Engineer, Technical Lead"
user2,Marketing,"Content Writer, Editor"
user3,Finance,"Accountant, Auditor"
user4,HR,HR Specialist
user5,"Support, Training",Customer Support Representativeuser_id,name,email,active,group,role,role_description
user1,Alice Smith,[email protected],true,Engineering,Software Engineer,Core development role
user1,Alice Smith,[email protected],true,QA Team,Technical Lead,Testing oversight role
user1,Alice Smith,[email protected],true,Product Team,Technical Lead,Product development leadership
user2,Bob Johnson,[email protected],false,Marketing,Content Writer,Content creation role
user2,Bob Johnson,[email protected],false,Marketing,Editor,Content review roleuser_id,name,email,is_active,groups,role,permissions
USR001,Alex Johnson,[email protected],true,"Dev Team",Developer,"view_code, edit_code"
USR001,Alex Johnson,[email protected],true,"Backend Group",Code Reviewer,"approve_pull_requests"
USR002,Taylor Smith,[email protected],yes,"Ops Team",System Administrator,"manage_infrastructure"
USR002,Taylor Smith,[email protected],yes,"Cloud Admin",Release Manager,"deploy_production"
USR003,Jordan Lee,[email protected],1,"Product Team",Product Owner,"create_requirements"
USR003,Jordan Lee,[email protected],1,"Analytics Users",Data Analyst,"view_analytics"user_id,display_name,email,active,department,team,job_title,role,role_permissions
emp101,John Smith,[email protected],true,Engineering,Backend,"Senior Developer","Developer Lead","read_all,write_backend,deploy_backend"
emp101,John Smith,[email protected],true,Engineering,Architecture,"Senior Developer","Architecture Committee","approve_designs,modify_architecture"
emp102,Jane Doe,[email protected],true,Engineering,Frontend,"UI Developer","Frontend Developer","read_all,write_frontend,deploy_frontend"
emp103,Robert Johnson,[email protected],true,Product,"Product Management","Product Owner","Product Manager","read_all,create_requirements,approve_features"
emp103,Robert Johnson,[email protected],true,Product,"UX Research","Product Owner","User Researcher","conduct_research,analyze_results"
emp104,Maria Garcia,[email protected],true,Marketing,Content,"Marketing Specialist","Content Creator","read_marketing,write_content"
emp104,Maria Garcia,[email protected],true,Marketing,Social,"Marketing Specialist","Social Media Manager","post_social,analyze_metrics"
emp105,David Lee,[email protected],true,Finance,Accounting,"Finance Manager","Financial Controller","approve_expenses,manage_budgets,generate_reports"
emp106,Sarah Wilson,[email protected],true,HR,Recruiting,"HR Specialist","Recruiter","post_jobs,review_applications,conduct_interviews"
emp107,Michael Brown,[email protected],true,Sales,"Enterprise Sales","Sales Executive","Account Manager","manage_clients,create_proposals,close_deals"user_id,name,email,active,created_at,last_login_at,password_last_changed_at,deactivated_at
TS001,Timestamp Example 1,[email protected],true,2023-04-12T15:34:56.123456789Z,2006-01-02T15:04:05Z07:00,20060102150405,
TS002,Timestamp Example 2,[email protected],true,2006-01-30 15:04:05Z07:00,2006-01-30 15:04:05,2006-01-30,2006-01-30T
TS003,Timestamp Example 3,[email protected],true,2006-01-30T15:04:05,2006-01-30T15:04:05Z,never,null
TS004,Timestamp Example 4,[email protected],false,2024-03-15,none,false,0
TS005,Timestamp Example 5,[email protected],true,1/2/2006,1/15/2023,11/22/2024,Import identity and authorization data from CSV files into Veza
employee_number: EMP001manager_id: emp001EMP0011