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 AzureAD PowerShell with MgGraph PowerShell script #2699

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
13 changes: 8 additions & 5 deletions power-platform/admin/programmability-authentication-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ Within your new app registration, navigate to the **Manage - API Permissions** t

If you don't see Power Platform API showing up in the list when searching by GUID, it's possible that you still have access to it but the visibility isn't refreshed. To force a refresh run the below PowerShell script:
```powershell
#Install the Microsoft Entra the module
Install-Module AzureAD
#Required Microsoft Graph modules
#Requires -Modules Microsoft.Graph.Authentication, Microsoft.Graph.Applications

Connect-AzureAD
New-AzureADServicePrincipal -AppId 8578e004-a5c6-46e7-913e-12f58912df43 -DisplayName "Power Platform API"
Connect-MgGraph -Scopes "Application.ReadWrite.All"
$ServicePrincipalID = @{
"AppId" = "8578e004-a5c6-46e7-913e-12f58912df43"
}
New-MgServicePrincipal -BodyParameter $ServicePrincipalID | Format-List id, DisplayName, AppId, SignInAudience
```

From here, you must select the permissions you require. These are grouped by [**Namespaces** ](/rest/api/power-platform). Within a namespace, you'll see resource types and actions for example *AppManagement.ApplicationPackages.Read* which give read permissions for application packages. For more information, see our [Permission reference](programmability-permission-reference.md) article.
Expand Down Expand Up @@ -110,4 +113,4 @@ Use the **access_token** value in subsequent calls to the Power Platform API wit

### See also
[Creating a service principal application via API (preview)](powerplatform-api-create-service-principal.md)<br/>
[PowerShell - Create service principal](powershell-create-service-principal.md)
[PowerShell - Create service principal](powershell-create-service-principal.md)
Loading