When you add permissions in Azure AD app registration, we can find the resource for customer insights API is https://azurecustomerinsights.com/
.
There is a options?: AzureTokenCredentialsOptions
parameter in loginWithServicePrincipalSecretWithAuthResponse
method.
See this line:
loginWithServicePrincipalSecretWithAuthResponse(clientId: string, secret: string, domain: string, options?: AzureTokenCredentialsOptions): Promise<AuthResponse>;
You can set the scope/resource through tokenAudience
in AzureTokenCredentialsOptions
. See reference here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…