question

tarouchabi-7271 avatar image
0 Votes"
tarouchabi-7271 asked tarouchabi-7271 edited

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

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 = "@*.onmicrosoft.com"
$clientId = "d1ddf0e4-d672-4dae-b554-9d5bdfd93547"
$redirectUri = "urn:ietf:wg:oauth:2.0:oob"
$resourceAppIdURI = "https://graph.microsoft.com"
$authority = "https://login.microsoftonline.com/$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

mem-intune-generalazure-ad-enterpriseapps
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello,

Do you have a service principal registered in Azure that you can use ?

Regards,

0 Votes 0 ·

No. I want to register microsoft.graph.intune (app ID = "d1ddf0e4-d672-4dae-b554-9d5bdfd93547"). But I don't know how to register from GUI.
If I run Connect-MSGraph -AdminConsent, it will register with the enterprise app. But in Azure Portal Enterprise App, It's not.

Only I want to this module "Install-Module -Name Microsoft.Graph.Intune".

0 Votes 0 ·

1 Answer

ClementBETACORNE avatar image
0 Votes"
ClementBETACORNE answered tarouchabi-7271 edited

Did you follow these instruction :
https://docs.microsoft.com/en-us/graph/powershell/installation

Regards,


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes........
I want to skip the admin consent and register for an enterprise application.
Because my problem is that I can't display the oauth admin consent screen by my company policy with powershell.
I want to know how to skip the administrator consent screen and register. Or, I want to register Microsoft.Graph.intune in Azure Ad Enterprise Application.

0 Votes 0 ·