trouble: How to register for an enterprise app with powershell.

tarou chabi 731 Reputation points

I want to register Microsoft.Graph.Intune.
But, my pc can't pop up the Aouth authentication screen to register. So, Connect-MSGraph cannot be used.

And I try to register with powershell.
But, the next code displays Aouth popup.

Connect-AzureAD -Credential $cre

$User = "***@****"
$clientId = "d1ddf0e4-d672-4dae-b554-9d5bdfd93547"
$redirectUri = "urn:ietf:wg:oauth:2.0:oob"
$resourceAppIdURI = ""
$authority = "$Tenant"

$authContext = New-Object "Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext" -ArgumentList $authority
$platformParameters = New-Object "Microsoft.IdentityModel.Clients.ActiveDirectory.PlatformParameters" -ArgumentList "Auto"
$userId = New-Object "Microsoft.IdentityModel.Clients.ActiveDirectory.UserIdentifier" -ArgumentList ($User, "OptionalDisplayableId")
$authResult = $authContext.AcquireTokenAsync($resourceAppIdURI,$clientId,$redirectUri,$platformParameters,$userId).Result

Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
3,706 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
17,605 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Clément BETACORNE 2,021 Reputation points

    Did you follow these instruction :