CmdID / PowerShell / Cmdlets / Update
Update-MgServicePrincipal
Create a new servicePrincipal object if it doesn't exist, or update the properties of an existing servicePrincipal object. Microsoft Graph PowerShell reference
From the Microsoft Graph PowerShell reference 70 parameters Its page in the reference
Parameters
Show its 70 parameters
-AccountEnabledtrue if the service principal account is enabled; otherwise, false.-AddInsDefines custom behavior that a consuming service can use to call an app in specific contexts.-AdditionalPropertiesAdditional Parameters-AlternativeNamesUsed to retrieve service principals by subscription, identify resource group and full resource IDs for managed identities.-AppDescriptionThe description exposed by the associated application.-AppDisplayNameThe display name exposed by the associated application.-AppIdThe unique identifier for the associated application (its appId property).-ApplicationTemplateIdUnique identifier of the applicationTemplate.-AppManagementPoliciesThe appManagementPolicy applied to this application.-AppOwnerOrganizationIdContains the tenant ID where the application is registered.-AppRoleAssignedToApp role assignments for this app or service, granted to users, groups, and other service principals.-AppRoleAssignmentRequiredSpecifies whether users or other service principals need to be granted an app role assignment for this service principal before users can sign in or apps can get tokens.-AppRoleAssignmentsApp role assignment for another app or service, granted to this service principal.-AppRolesThe roles exposed by the application that's linked to this service principal.-BodyParameterservicePrincipal To construct, see NOTES section for BODYPARAMETER properties and create a hash table.-BreakWait for .NET debugger to attach-ClaimsMappingPoliciesThe claimsMappingPolicies assigned to this service principal.-Confirm, -cfPrompts you for confirmation before running the cmdlet.-CreatedByAppIdThe appId of the application that created this service principal.-CreatedObjectsDirectory objects created by this service principal.-CustomSecurityAttributescustomSecurityAttributeValue-DelegatedPermissionClassificationsTo construct, see NOTES section for DELEGATEDPERMISSIONCLASSIFICATIONS properties and create a hash table.-DeletedDateTimeDate and time when this object was deleted.-DescriptionFree text field to provide an internal end-user facing description of the service principal.-DisabledByMicrosoftStatusSpecifies whether Microsoft has disabled the registered application.-DisplayNameThe display name for the service principal.-EndpointsTo construct, see NOTES section for ENDPOINTS properties and create a hash table.-FederatedIdentityCredentialsFederated identities for a specific type of service principal - managed identity.-HeadersOptional headers that will be added to the request.-HomepageHome page or landing page of the application.-HomeRealmDiscoveryPoliciesThe homeRealmDiscoveryPolicies assigned to this service principal.-HttpPipelineAppendSendAsync Pipeline Steps to be appended to the front of the pipeline-HttpPipelinePrependSendAsync Pipeline Steps to be prepended to the front of the pipeline-IdThe unique identifier for an entity.-InfoinformationalUrl To construct, see NOTES section for INFO properties and create a hash table.-InputObjectIdentity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.-IsDisabled-KeyCredentialsThe collection of key credentials associated with the service principal.-LoginUrlSpecifies the URL where the service provider redirects the user to Microsoft Entra ID to authenticate.-LogoutUrlSpecifies the URL that the Microsoft's authorization service uses to sign out a user using OpenID Connect front-channel, back-channel, or SAML sign out protocols.-MemberOfRoles that this service principal is a member of.-NotesFree text field to capture information about the service principal, typically used for operational purposes.-NotificationEmailAddressesSpecifies the list of email addresses where Microsoft Entra ID sends a notification when the active certificate is near the expiration date.-Oauth2PermissionGrantsDelegated permission grants authorizing this service principal to access an API on behalf of a signed-in user.-Oauth2PermissionScopesThe delegated permissions exposed by the application.-OwnedObjectsDirectory objects that this service principal owns.-OwnersDirectory objects that are owners of this servicePrincipal.-PasswordCredentialsThe collection of password credentials associated with the application.-PreferredSingleSignOnModeSpecifies the single sign-on mode configured for this application.-PreferredTokenSigningKeyThumbprintThis property can be used on SAML applications (apps that have preferredSingleSignOnMode set to saml) to control which certificate is used to sign the SAML responses.-ProxyThe URI for the proxy server to use-ProxyCredentialCredentials for a proxy server to use for the remote call-ProxyUseDefaultCredentialsUse the default credentials for the proxy-RemoteDesktopSecurityConfigurationremoteDesktopSecurityConfiguration To construct, see NOTES section for REMOTEDESKTOPSECURITYCONFIGURATION properties and create a hash table.-ReplyUrlsThe URLs that user tokens are sent to for sign in with the associated application, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to for the associated application.-ResourceSpecificApplicationPermissionsThe resource-specific application permissions exposed by this application.-ResponseHeadersVariable, -RHVOptional Response Headers Variable.-SamlSingleSignOnSettingssamlSingleSignOnSettings To construct, see NOTES section for SAMLSINGLESIGNONSETTINGS properties and create a hash table.-ServicePrincipalIdThe unique identifier of servicePrincipal-ServicePrincipalNamesContains the list of identifiersUris, copied over from the associated application.-ServicePrincipalTypeIdentifies whether the service principal represents an application, a managed identity, or a legacy application.-SignInAudienceSpecifies the Microsoft accounts that are supported for the current application.-Synchronizationsynchronization To construct, see NOTES section for SYNCHRONIZATION properties and create a hash table.-TagsCustom strings that can be used to categorize and identify the service principal.-TokenEncryptionKeyIdSpecifies the keyId of a public key from the keyCredentials collection.-TokenIssuancePoliciesThe tokenIssuancePolicies assigned to this service principal.-TokenLifetimePoliciesThe tokenLifetimePolicies assigned to this service principal.-TransitiveMemberOfTo construct, see NOTES section for TRANSITIVEMEMBEROF properties and create a hash table.-VerifiedPublisherverifiedPublisher To construct, see NOTES section for VERIFIEDPUBLISHER properties and create a hash table.-WhatIf, -wiRuns the command in a mode that only reports what would happen without performing the actions.