TS utilities to resolve Microsoft cloud host and Power BI URLs.
// Source: https://github.com/activepieces/activepieces | License: MIT | Copyright 2020-2024 Activepieces Inc
// Provided via justclaw.it.com; keep this notice with the code.
import { OAuth2PropertyValue, Property } from '@activepieces/pieces-framework';
const COMMERCIAL_LOGIN_HOST = 'login.microsoftonline.com';
const GOV_LOGIN_HOST = 'login.microsoftonline.us';
const POWER_BI_BASE_URLS: Record<string, string> = {
[COMMERCIAL_LOGIN_HOST]: 'https://api.powerbi.com/v1.0/myorg',
[GOV_LOGIN_HOST]: 'https://api.powerbigov.us/v1.0/myorg',
};
const POWER_BI_SCOPE_HOSTS: Record<string, string> = {
[COMMERCIAL_LOGIN_HOST]: 'analysis.windows.net',
[GOV_LOGIN_HOST]: 'analysis.usgovcloudapi.net',
};
export const microsoftCloudProperty = Property.StaticDropdown({
displayName: 'Cloud Envir
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key