Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ehsanhm8
Contributor
Contributor

Establish OAuth2 in Qlik Sense

I am using this code in python and I use a service account json file to authenticate my connection to the google data:

 

from google.oauth2 import service_account
from googleapiclient.discovery import build

# Set the domain you want to query
DOMAIN = 'XXX.com'

# Set the scopes and service account credentials
SCOPES_USER = ['https://www.googleapis.com/auth/admin.directory.user.readonly']
SERVICE_ACCOUNT_FILE_CD = './gwapi-367609-ae967bb5244b.json'
USERMAIL_CD = 'XXX@YYY.com'

# Create credentials
credentials_user_cd = service_account.Credentials.from_service_account_file(SERVICE_ACCOUNT_FILE_CD, scopes=SCOPES_USER)
delegated_credentials_user_cd = credentials_user_cd.with_subject(USERMAIL_CD)

# Build the service object for the Directory API
admin_service_user = build('admin', 'directory_v1', credentials=delegated_credentials_user_cd)

 

I wanted to know how can I automatize the same procedure in Qlik automation? What type of connection I need to use?

Labels (1)
0 Replies