Skip to content

Commit 7c0e0d9

Browse files
authored
Merge pull request #240 from microsoftgraph/dm/application-sample
Add samples for Application API
2 parents 0e83a21 + ce877c6 commit 7c0e0d9

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

samples/1-FindCommands.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Find-module Microsoft.Graph* | Select-Object Name
55
# Commands Available for licenses
66
Get-Command -Module Microsoft.Graph* *license*
77

8-
# Commands Available for Outlook tasks
9-
Get-Command -Module Microsoft.Graph* *OutlookTask*
8+
# Commands Available for managing application registrations
9+
Get-Command -Module Microsoft.Graph* *application*
1010

1111
# Commands Available for Teams
1212
Get-Command -Module Microsoft.Graph* *Team*

samples/3-TenantInformation.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,3 @@ Get-MgApplication | Select-Object DisplayName, Appid, WebRedirectUris
1212
## List service principals in the tenant
1313
get-MgServicePrincipal | Select-Object id, AppDisplayName | Where-Object { $_.AppDisplayName -like "*powershell*" }
1414

15-
## Create a new Application Registration
16-
New-MgApplication -displayName "MyTestApp7"

samples/9-Applications.ps1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
# Create an application for use with DeviceCodeFlow
3+
$app1 = new-mgApplication -displayName "DeviceCodeFlowApp" `
4+
-IsFallbackPublicClient `
5+
-PublicClientRedirectUris "https://login.microsoftonline.com/common/oauth2/nativeclient"
6+
7+
# Create an application for use with Native Client an interactive sign in
8+
$app2 = new-mgApplication -displayName "NativeAppInteractiveFlowApp" `
9+
-IsFallbackPublicClient `
10+
-PublicClientRedirectUris "http://localhost"
11+
12+
# Create an web app with implicit auth
13+
$app3 = new-mgApplication -displayName "ImplicitWebApp" `
14+
-ImplicitGrantSettingEnableAccessTokenIssuance `
15+
-ImplicitGrantSettingEnableIdTokenIssuance `
16+
-WebRedirectUris "https://localhost:3000/"
17+

0 commit comments

Comments
 (0)