매니페스트 참조를 확인하고 필요한 모든 항목을 포함하여 매니페스트를 작성합니다.
다음과 같은 정보를 포함합니다.
dataStudio.forceViewersCredentials를 true로 설정합니다.
dataStudio.advancedServices.data를 true로 설정합니다.
oauthScopes에 https://www.googleapis.com/auth/userinfo.email 추가 및
https://www.googleapis.com/auth/script.external_request입니다. 승인을 참조하세요.
Apps Script 범위를 참조하세요.
<ph type="x-smartling-placeholder">
var SERVICE_ACCOUNT_CREDS = 'SERVICE_ACCOUNT_CREDS';
var SERVICE_ACCOUNT_KEY = 'private_key';
var SERVICE_ACCOUNT_EMAIL = 'client_email';
var BILLING_PROJECT_ID = 'project_id';
/**
* Copy the entire credentials JSON file from creating a service account in GCP.
*/
function getServiceAccountCreds() {
return JSON.parse(scriptProperties.getProperty(SERVICE_ACCOUNT_CREDS));
}
function getOauthService() {
var serviceAccountCreds = getServiceAccountCreds();
var serviceAccountKey = serviceAccountCreds[SERVICE_ACCOUNT_KEY];
var serviceAccountEmail = serviceAccountCreds[SERVICE_ACCOUNT_EMAIL];
return OAuth2.createService('RowLevelSecurity')
.setAuthorizationBaseUrl('https://accounts.google.com/o/oauth2/auth')
.setTokenUrl('https://accounts.google.com/o/oauth2/token')
.setPrivateKey(serviceAccountKey)
.setIssuer(serviceAccountEmail)
.setPropertyStore(scriptProperties)
.setCache(CacheService.getScriptCache())
.setScope(['https://www.googleapis.com/auth/bigquery.readonly']);
}
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-08-21(UTC)"],[[["This solution enables creating a BigQuery dashboard where viewers see only their relevant data based on a pre-defined mapping."],["It leverages a service account for centralized billing and requires a one-time authorization from each viewer."],["The implementation involves creating a Community Connector, setting up a service account, and constructing a BigQuery query that filters data based on the viewer's email."],["The dashboard can be shared with users via a link, and usage can be optionally measured using Google Analytics."]]],[]]