Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced PowerShell cmdlets from archived MSAL.PS module with Microsoft.PowerApps.Administration.PowerShell module #2702

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,18 @@ Use the following PowerShell script to authenticate using Power Platform API.

> [!NOTE]
> Users with the Power Platform administrator Entra ID role have permission to run the tenant isolation impact report.
> Moreover, you can also create an application registration and configure Power Platform API permissions, see [Microsoft Entra setup for calling Power Platform API (preview)](programmability-authentication-v2.md).

```PowerShell
Import-Module "MSAL.PS"
$AuthResult = Get-MsalToken -ClientId '49676daf-ff23-4aac-adcc-55472d4e2ce0' -Scope 'https://api.powerplatform.com/.default'
$Headers = @{Authorization = "Bearer $($AuthResult.AccessToken)"}
Import-Module "Microsoft.PowerApps.Administration.PowerShell"

$tenantId = "<tenant id>"
$appId = "<your Microsoft Entra Application Id for calling Power Platform API>"
$certificateThumbprint = "<your Microsoft Entra app registration Certificate Thumbprint for calling Power Platform API>"

Add-PowerAppsAccount -Endpoint "prod" -TenantId $tenantId -CertificateThumbprint $certificateThumbprint -ApplicationId $appId
$AuthResult = Get-JwtToken -Audience "https://api.powerplatform.com"
$Headers = @{Authorization = "Bearer $($AuthResult)"}
```

## Step 2. Create a report
Expand Down Expand Up @@ -142,3 +149,5 @@ Power Platform API reference: [List Cross Tenant Connection Reports](/rest/api/p
### See also

[Power Platform API reference - Cross Tenant Connection Reports](/rest/api/power-platform/governance/cross-tenant-connection-reports)

[Microsoft Entra setup for calling Power Platform API (preview)](programmability-authentication-v2.md)
Loading