Additional examples for creating a new application: New-MgApplication
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Dokumentation
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- powershell
- Bereich
- documentation
Rechercherichtung
Beginnen Sie mit der Dokumentationsseite zu New-MgApplication sowie dem vorhandenen Beispiel und Abschnitt mit Hinweisen. Fügen Sie die beiden vorgeschlagenen Beispiele für Web-Einstellungen und erforderlichen Ressourcenzugriff mit ihren Erläuterungen hinzu; die Arbeit ist abgeschlossen, wenn die Seite diese Parameterkombinationen klar demonstriert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Is your feature request related to a problem? Please describe the problem.
Some of the documentation lacks clarity and could use additional examples. For instance, the New-MgApplication documentation page contains one example but accepts close to 55 parameters. While it's impractical to add an example for each one of them, the documentation could use a couple of more examples. The notes section shows what properties each of them should contain so to expand on a couple of them and demonstrate would be helpful
Describe the solution you'd like.
The documentation could be updated with the following examples:
Example 1: Create a new application with web settings
New-MgApplication -DisplayName "New app" -Web @{
ImplicitGrantSettings = @{
EnableAccessTokenIssuance = $true
EnableIdTokenIssuance = $true
}
RedirectUris = "http://localhost.com"
}
The above example creates a new application with both access tokens and Id tokens to be issued. Additionally, it also sets the redirect uri for the app registration to redirect to after successful authentication
Example 2: Create a new application with access to specified resources
Step1: Create a JSON representation of the required resources
$RequiredResource= @'[
{
"ResourceAppId": "00000003-0000-0000-c000-000000000000",
"ResourceAccess": [
{
"Id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
"Type": "Scope"
},
{
"Id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
"Type": "Role"
}
]
},
{
"ResourceAppId": "00000002-0000-0000-c000-000000000000",
"ResourceAccess": [
{
"Id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
"Type": "Scope"
}
]
}
]'@
Step 2: Read the JSON object
$RequiredResourceAccess = @(
$RequiredResource | ForEach-Object {
@{
ResourceAppId = $_.ResourceAppId
ResourceAccess = @(
$_.ResourceAccess | ForEach-Object {
@{
Id = $_.Id
Type = $_.Type
}
}
)
}
})
Step 3: Create the application
New-MgApplication -DisplayName $AppRegistrationName -RequiredResourceAccess $RequiredResourceAccess
The above example allows for creation of an app registration with access to several required resources and permissions
Additional context?
No response
- Vorherrschende Sprache
- C#
- Sterne
- 898
- Forks
- 230
- Ø Merge
- 2 T. 5 Std.
- Gemergte PRs (30 T.)
- 31
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoftgraph/msgraph-sdk-powershell
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
-
status:waiting-for-triage type:bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
status:waiting-for-triage type:bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
-
status:waiting-for-triage type:bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
Alle Issues in microsoftgraph/msgraph-sdk-powershell
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
SubtitleEdit/subtitleedit#15108 · 1 Kommentar ·
-
area/docs-content Bug pulumi/docs
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 94/100
-
agentic-workflows untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100