Edit

Share via


Import-CMAADServerApplication

Create the Microsoft Entra server app definition in Configuration Manager.

Syntax

Default (Default)

Import-CMAADServerApplication
    [-AppIdUri <Uri>]
    [-AppName] <String>
    [-AzureEnvironmentOption <AzureEnvironment>]
    [-ClientId] <String>
    [-SecretKey] <SecureString>
    [-SecretKeyExpiry] <DateTime>
    [-TenantId] <String>
    [-TenantName] <String>
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Use this cmdlet to import the server app from Microsoft Entra ID, and define it for the Configuration Manager site. It assumes that an Azure administrator already created the app in Microsoft Entra ID. In Microsoft Entra ID, this app is known as a web app registration.

For more information on how to use this cmdlet to create a cloud management gateway (CMG), see 2010 release notes: Cloud management gateway.

For more information about Microsoft Entra apps in Configuration Manager, see Configure Azure services.

Note

This cmdlet might work with other Azure services, but it's only tested with the Cloud management connection to support the cloud management gateway (CMG).

Examples

Example 1

In this example, the first command creates a datetime variable for 11/16/2021. The second command uses this date variable as the secret key expiry date, when it imports the server app using the details provided.

$date = [datetime]::parseexact("11/16/2021", 'MM/dd/yyyy', $null)

Import-CMAADServerApplication -TenantName "Contoso" -TenantId "05a349fa-298a-4427-8771-9efcdb73431e" -AppName "CmgServerApp" -ClientId "7078946d-fc1c-43b7-8dee-dd6e6b00d783" -SecretKey "1uXGR^!0@Cjas6qI*J02ZeS&&zY19^hC*9" -SecretKeyExpiry $date

Parameters

-AppIdUri

Specify the Application ID URI of the app registration entry in the Microsoft Entra admin center. This value needs to be unique in your Microsoft Entra tenant. It's in the access token used by the Configuration Manager client to request access to the service. The format is similar to https://ConfigMgrService.

Parameter properties

Type:Uri
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AppName

Specify the friendly name for the app. This value is the display name in the app registration.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ApplicationName

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AzureEnvironmentOption

Specify whether this app registration is in the global Azure cloud (AzurePublicCloud), or the Azure Government cloud (AzureUSGovernmentCloud).

Parameter properties

Type:AzureEnvironment
Default value:None
Accepted values:AzurePublicCloud, AzureUSGovernmentCloud
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ClientId

Specify the Application (client) ID value of the app registration in Microsoft Entra ID. The format is a standard GUID.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SecretKey

Specify the secret key for this app as copied from the Azure portal. You copied the secret key when you registered the app in Microsoft Entra ID.

Parameter properties

Type:SecureString
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:4
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SecretKeyExpiry

Specify the date when the SecretKey will expire. You configure this value when you create the secret key for the app in Microsoft Entra ID.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:5
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TenantId

Specify the GUID of your Microsoft Entra tenant.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TenantName

Specify the name of your Microsoft Entra tenant.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet isn't run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

IResultObject