Additional examples for creating a new application: New-MgApplication
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 55/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- powershell
- Ambito
- documentation
Direzione di ricerca
Inizia dalla pagina di documentazione di New-MgApplication e dal relativo esempio esistente e dalla sezione delle note. Aggiungi i due esempi proposti per le impostazioni web e l’accesso alle risorse richiesto, con le relative spiegazioni; il lavoro è completo quando la pagina dimostra chiaramente queste combinazioni di parametri.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- C#
- Stelle
- 898
- Fork
- 230
- Merge medio
- 2g 5h
- PR unite (30g)
- 31
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoftgraph/msgraph-sdk-powershell
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
status:waiting-for-triage type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
status:waiting-for-triage type:bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
status:waiting-for-triage type:bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Tutte le issue di microsoftgraph/msgraph-sdk-powershell
Issue simili
-
bug documentation frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
azurenoops/spin_agent#975 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SubtitleEdit/subtitleedit#15108 · 1 commento ·
-
area/docs-content Bug pulumi/docs
Difficoltà 1/5 1-3 ore Idoneità per principianti 94/100