|
1 | | -# this is a workaround to get the variables set for now |
2 | | -# TODO: change to use PSFConfig? |
| 1 | +Set-PSFConfig -Name 'FabricTools.FabricApi.BaseApiUrl' -Value 'https://api.fabric.microsoft.com/v1' |
| 2 | +Set-PSFConfig -Name 'FabricTools.FabricApi.ResourceUrl' -Value 'https://api.fabric.microsoft.com' |
| 3 | +Set-PSFConfig -Name 'FabricTools.FabricApi.TenantId' |
| 4 | +Set-PSFConfig -Name 'FabricTools.FabricApi.ContentType' -Value 'application/json; charset=utf-8' |
3 | 5 |
|
4 | | -$script:FabricSession = [ordered]@{ |
5 | | - BaseApiUrl = 'https://api.fabric.microsoft.com/v1' |
6 | | - ResourceUrl = 'https://api.fabric.microsoft.com' |
7 | | - HeaderParams = $null |
8 | | - ContentType = @{'Content-Type' = "application/json" } |
9 | | - KustoURL = "https://api.kusto.windows.net" |
10 | | - AccessToken = $null |
11 | | -} |
| 6 | +Set-PSFConfig -Name 'FabricTools.FabricSession.Headers' -Value @{} |
| 7 | +Set-PSFConfig -Name 'FabricTools.FabricSession.TokenExpiresOn' -Value $null |
| 8 | +Set-PSFConfig -Name 'FabricTools.FabricSession.AccessToken' -Value $null |
12 | 9 |
|
13 | | -$script:AzureSession = [ordered]@{ |
14 | | - BaseApiUrl = "https://management.azure.com" |
15 | | - AccessToken = $null |
16 | | - HeaderParams = $null |
17 | | -} |
| 10 | +Set-PSFConfig -Name 'FabricTools.KustoApi.BaseUrl' -Value 'https://api.kusto.windows.net' |
| 11 | +Set-PSFConfig -Name 'FabricTools.AzureApi.BaseUrl' -Value "https://management.azure.com" |
18 | 12 |
|
19 | | -$script:PowerBI = [ordered]@{ |
20 | | - BaseApiUrl = "https://api.powerbi.com/v1.0/myorg" |
21 | | -} |
| 13 | +Set-PSFConfig -Name 'FabricTools.AzureSession.AccessToken' -Value $null |
| 14 | +Set-PSFConfig -Name 'FabricTools.AzureSession.Headers' -Value @{} |
22 | 15 |
|
23 | | -$FabricConfig = @{ |
| 16 | +Set-PSFConfig -Name 'FabricTools.PowerBiApi.BaseUrl' -Value "https://api.powerbi.com/v1.0/myorg" |
| 17 | + |
| 18 | +# Remain backwards compatible with scripts relying on $FabricConfig variable |
| 19 | +$script:FabricConfig = @{ |
24 | 20 | BaseUrl = "https://api.fabric.microsoft.com/v1" |
25 | | - ResourceUrl = "https://api.fabric.microsoft.com" |
26 | | - FabricHeaders = @{} |
27 | | - TenantId = "" |
28 | | - TokenExpiresOn = "" |
29 | | - FeatureFlags = @{ |
30 | | - EnableTokenRefresh = $true |
31 | | - } |
32 | 21 | } |
| 22 | + |
| 23 | +# Feature Flags |
| 24 | +Set-PSFConfig -Name 'FabricTools.FeatureFlags.EnableTokenRefresh' -Value $true -Validation bool |
0 commit comments