New-AzureADMSApplication
Skapar (registrerar) ett nytt programobjekt.
Syntax
New-AzureADMSApplication
[-AddIns <System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]>]
[-Api <ApiApplication>]
[-AppRoles <System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]>]
[-GroupMembershipClaims <String>]
[-IsDeviceOnlyAuthSupported <Boolean>]
[-IsFallbackPublicClient <Boolean>]
[-IdentifierUris <System.Collections.Generic.List`1[System.String]>]
-DisplayName <String>
[-InformationalUrl <InformationalUrl>]
[-KeyCredentials <System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]>]
[-OptionalClaims <OptionalClaims>]
[-ParentalControlSettings <ParentalControlSettings>]
[-PasswordCredentials <System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]>]
[-PublicClient <PublicClientApplication>]
[-RequiredResourceAccess <System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]>]
[-SignInAudience <String>]
[-Tags <System.Collections.Generic.List`1[System.String]>]
[-TokenEncryptionKeyId <String>]
[-Web <WebApplication>]
[<CommonParameters>]
Description
Skapar (registrerar) ett nytt programobjekt.
Exempel
Exempel 1: Skapa ett program
PS C:\>New-AzureADMSApplication -DisplayName "My new application" -IdentifierUris "http://mynewapp.contoso.com"
ObjectId AppId DisplayName
-------- ----- -----------
acd10942-5747-4385-8824-4c5d5fa904f9 b5fecfab-0ea2-4fd1-8570-b2c41b3d5149 My new application
Det här kommandot skapar ett program i Azure AD.
Exempel 2: Skapa ett program
PS C:\>New-AzureADMSApplication `
-DisplayName "my name" `
-AddIns @{ Type = "mytype"; Properties = [PSCustomObject]@{ Key = "key"; Value = "value" } } `
-Api @{ AcceptMappedClaims = $true } `
-AppRoles @{ Id = "21111111-1111-1111-1111-111111111111"; DisplayName = "role"; AllowedMemberTypes = "User"; Description = "mydescription"; Value = "myvalue" } `
-InformationalUrl @{ SupportUrl = "https://mynewapp.contoso.com/support.html" } `
-IsDeviceOnlyAuthSupported $false `
-IsFallbackPublicClient $false `
-KeyCredentials @{ KeyId = "11111111-1111-1111-1111-111111111111"; Usage = "Encrypt"; Key = {cert}; Type = "AsymmetricX509Cert" } `
-OptionalClaims @{ IdToken = [PSCustomObject]@{ Name = "claimName"; Source = "claimSource" } } `
-ParentalControlSettings @{ LegalAgeGroupRule = "Block" } `
-PublicClient @{ RedirectUris = "https://mynewapp.contoso.com/" } `
-RequiredResourceAccess @{ ResourceAppId = "31111111-1111-1111-1111-111111111111"; ResourceAccess = [PSCustomObject]@{ Type = "Scope" } } `
-SignInAudience AzureADandPersonalMicrosoftAccount `
-Tags "mytag" `
-TokenEncryptionKeyId "11111111-1111-1111-1111-111111111111" `
-Web @{ LogoutUrl = "https://mynewapp.contoso.com/logout.html" } `
-GroupMembershipClaims "SecurityGroup" `
-PasswordCredentials {passwordcredentials}
Id : 6a32197d-6f56-4980-b127-8f0bff362245
OdataType :
AddIns : {class AddIn {
Id: 4bd3715c-f089-4e88-9619-c34af1fb9519
Type: mytype
Properties: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyValue]
}
}
Api : class ApiApplication {
AcceptMappedClaims:
KnownClientApplications:
PreAuthorizedApplications:
RequestedAccessTokenVersion: 2
Oauth2PermissionScopes:
System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PermissionScope]
AppId : 4095dbc0-2095-42d3-b631-7a48eeede86c
ApplicationTemplateId :
AppRoles : {class AppRole {
AllowedMemberTypes: System.Collections.Generic.List`1[System.String]
Description: mydescription
DisplayName: role
Id: 21111111-1111-1111-1111-111111111111
IsEnabled: True
Origin: Application
Value: myvalue
}
}
GroupMembershipClaims : SecurityGroup
IsDeviceOnlyAuthSupported : False
IsFallbackPublicClient : False
IdentifierUris : {}
CreatedDateTime :
DeletedDateTime :
DisplayName : my name
Info : class InformationalUrl {
TermsOfServiceUrl:
MarketingUrl:
PrivacyStatementUrl:
SupportUrl: https://mynewapp.contoso.com/support.html
LogoUrl:
}
KeyCredentials : {class KeyCredential {
CustomKeyIdentifier: System.Byte[]
DisplayName:
EndDateTime:
KeyId: 11111111-1111-1111-1111-111111111111
StartDateTime:
Type: AsymmetricX509Cert
Usage: Encrypt
Key:
}
}
OptionalClaims : class OptionalClaims {
IdToken: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.OptionalClaim]
AccessToken:
System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.OptionalClaim]
Saml2Token: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.OptionalClaim]
}
ParentalControlSettings : class ParentalControlSettings {
CountriesBlockedForMinors: System.Collections.Generic.List`1[System.String]
LegalAgeGroupRule: BlockMinors
}
PasswordCredentials : {}
PublicClient : class PublicClientApplication {
RedirectUris: System.Collections.Generic.List`1[System.String]
}
PublisherDomain :
RequiredResourceAccess : {class RequiredResourceAccess {
ResourceAppId: 31111111-1111-1111-1111-111111111111
ResourceAccess:
System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.ResourceAccess]
}
}
SignInAudience : AzureADandPersonalMicrosoftAccount
Tags : {mytag}
TokenEncryptionKeyId : 11111111-1111-1111-1111-111111111111
Web : class WebApplication {
HomePageUrl:
LogoutUrl: https://mynewapp.contoso.com/logout.html
RedirectUris: System.Collections.Generic.List`1[System.String]
ImplicitGrantSettings: class ImplicitGrantSettings {
EnableIdTokenIssuance: False
EnableAccessTokenIssuance: False
}
}
Det här kommandot skapar ett program i Azure AD.
Parametrar
-AddIns
Definierar anpassat beteende som en förbrukningstjänst kan använda för att anropa en app i specifika kontexter. Till exempel kan program som kan rendera filströmmar ange egenskapen addIns för dess "FileHandler"-funktioner. På så sätt kan tjänster som Office 365 anropa programmet i kontexten för ett dokument som användaren arbetar med.
Type: | List<T>[Microsoft.Open.MSGraph.Model.AddIn] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Api
Anger inställningar för ett program som implementerar ett webb-API.
Type: | ApiApplication |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AppRoles
Den samling programroller som ett program kan deklarera. Dessa roller kan tilldelas till användare, grupper eller tjänstens huvudnamn.
Type: | List<T>[Microsoft.Open.MSGraph.Model.AppRole] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisplayName
Anger visningsnamnet för programmet.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GroupMembershipClaims
Konfigurerar det gruppanspråk som utfärdas i en användare eller OAuth 2.0-åtkomsttoken som programmet förväntar sig.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IdentifierUris
Användardefinierade URI:er som unikt identifierar ett webbprogram i dess Azure AD klientorganisation eller inom en verifierad anpassad domän (se fliken Domäner på den klassiska Azure-portalen) om programmet är flera klientorganisationer.
Det första elementet fylls i från webbprogrammets "APP ID URI"-fält om det uppdateras via den klassiska Azure-portalen (eller respektive Azure AD PowerShell-cmdletparameter). Ytterligare URI:er kan läggas till via programmanifestet. Mer information finns i Förstå Azure AD-programmanifestet. Den här samlingen används också för att fylla i webbprogrammets servicePrincipalNames-samling.
Type: | List<T>[String] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InformationalUrl
Grundläggande profilinformation för programmet, till exempel appens marknadsföring, support, användningsvillkor och URL:er för sekretesspolicyn. Användarvillkoren och sekretesspolicyn visas för användarna via användarmedgivandeupplevelsen.
Type: | InformationalUrl |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IsDeviceOnlyAuthSupported
Anger om programmet stöder autentisering med hjälp av en enhetstoken.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IsFallbackPublicClient
Anger programtypen återställning som offentlig klient, till exempel ett installerat program som körs på en mobil enhet. Standardvärdet är falskt, vilket innebär att programtypen för återställning är konfidentiell klient, till exempel webbapp. Det finns vissa scenarier där Azure AD inte kan fastställa klientprogramtypen (t.ex. ROPC-flöde där det har konfigurerats utan att ange en omdirigerings-URI). I dessa fall tolkar Azure AD programtypen baserat på värdet för den här egenskapen.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-KeyCredentials
Samlingen med nyckelautentiseringsuppgifter som är associerade med programmet
Type: | List<T>[Microsoft.Open.MSGraph.Model.KeyCredential] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OptionalClaims
Programutvecklare kan konfigurera valfria anspråk i sina Azure AD-appar för att ange vilka anspråk de vill ha i token som skickas till deras program av Microsofts säkerhetstokentjänst.
Type: | OptionalClaims |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ParentalControlSettings
Anger inställningar för föräldrakontroll för ett program.
Type: | ParentalControlSettings |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PasswordCredentials
Den samling lösenordsautentiseringsuppgifter som är associerade med programmet
Type: | List<T>[Microsoft.Open.MSGraph.Model.PasswordCredential] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PublicClient
Anger om det här programmet är en offentlig klient (till exempel ett installerat program som körs på en mobil enhet). Standardvärdet är false.
Anger om det här programmet är en offentlig klient (till exempel ett installerat program som körs på en mobil enhet). Standardvärdet är false.
Type: | PublicClientApplication |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RequiredResourceAccess
Anger resurser som det här programmet kräver åtkomst till och den uppsättning OAuth-behörighetsomfattningar och programroller som behövs under var och en av dessa resurser. Den här förkonfigurationen av nödvändig resursåtkomst styr medgivandeupplevelsen.
Type: | List<T>[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SignInAudience
Anger vilka Microsoft-konton som stöds för det aktuella programmet.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Tags
Anpassade strängar som kan användas för att kategorisera och identifiera programmet.
Type: | List<T>[String] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TokenEncryptionKeyId
Anger keyId för en offentlig nyckel från samlingen keyCredentials. När den konfigureras krypterar Azure AD alla token som den genererar med hjälp av nyckeln som den här egenskapen pekar på. Programkoden som tar emot den krypterade token måste använda den matchande privata nyckeln för att dekryptera token innan den kan användas för den inloggade användaren.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Web
Anger inställningar för ett webbprogram.
Type: | WebApplication |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indata
Boolean
Microsoft.Open.MSGraph.Model.ApiApplication
Microsoft.Open.MSGraph.Model.InformationalUrl
Microsoft.Open.MSGraph.Model.OptionalClaims
Microsoft.Open.MSGraph.Model.ParentalControlSettings
Microsoft.Open.MSGraph.Model.PublicClientApplication
Microsoft.Open.MSGraph.Model.WebApplication
String
List<T>[Microsoft.Open.MSGraph.Model.AddIn]
List<T>[Microsoft.Open.MSGraph.Model.AppRole]
List<T>[Microsoft.Open.MSGraph.Model.KeyCredential]
List<T>[Microsoft.Open.MSGraph.Model.PasswordCredential]
List<T>[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]
Utdata
Microsoft.Open.MSGraph.Model.MsApplication
Relaterade länkar
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för