applicationTemplate:实例化
命名空间:microsoft.graph
将应用程序的实例从Azure AD应用程序库添加到目录中。 还可以使用此 API 实例化 非库应用。 对 applicationTemplate 对象使用以下 ID: 8adf8e6e-67b2-4cf2-a259-e3dc5476c621.
权限
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 | 权限(从最低特权到最高特权) |
|---|---|
| 委派(工作或学校帐户) | Application.ReadWrite.All、Directory.ReadWrite.All |
| 委派(个人 Microsoft 帐户) | 不支持。 |
| 应用程序 | Application.ReadWrite.OwnedBy、Application.ReadWrite.All、Directory.ReadWrite.All |
HTTP 请求
POST /applicationTemplates/{applicationTemplate-id}/instantiate
若要实例化非库应用,请使用8adf8e6e-67b2-4cf2-a259-e3dc5476c621 {applicationTemplate-id}
请求标头
| 名称 | 说明 |
|---|---|
| Authorization | Bearer {code} |
请求正文
在请求正文中,提供具有以下参数的 JSON 对象。
| 参数 | 类型 | 说明 |
|---|---|---|
| displayName | String | 应用程序的自定义名称 |
响应
如果成功,此方法在响应正文中返回 201 Created 响应代码和新的 applicationServicePrincipal 对象。
示例
以下示例演示如何调用此 API。
请求
下面展示了示例请求。
POST https://graph.microsoft.com/v1.0/applicationTemplates/229946b9-a9fb-45b8-9531-efa47453ac9e/instantiate
Content-type: application/json
{
"displayName": "Azure AD SAML Toolkit"
}
响应
下面展示了示例响应。
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 201 Created
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.applicationServicePrincipal",
"application": {
"id": "20845737-a145-446f-aa3c-77d432903957",
"appId": "3c653ec4-4e4c-4820-8127-49e3889cad99",
"applicationTemplateId": "229946b9-a9fb-45b8-9531-efa47453ac9e",
"createdDateTime": "2022-04-25T16:48:24Z",
"deletedDateTime": null,
"displayName": "Azure AD SAML Toolkit",
"groupMembershipClaims": null,
"identifierUris": [],
"isFallbackPublicClient": false,
"signInAudience": "AzureADMyOrg",
"tags": [],
"tokenEncryptionKeyId": null,
"defaultRedirectUri": null,
"optionalClaims": null,
"addIns": [],
"api": {
"acceptMappedClaims": null,
"knownClientApplications": [],
"requestedAccessTokenVersion": null,
"oauth2PermissionScopes": [
{
"adminConsentDescription": "Allow the application to access Azure AD SAML Toolkit on behalf of the signed-in user.",
"adminConsentDisplayName": "Access Azure AD SAML Toolkit",
"id": "00e7ef81-4deb-41d7-9ee3-90d4eba1e991",
"isEnabled": true,
"type": "User",
"userConsentDescription": "Allow the application to access Azure AD SAML Toolkit on your behalf.",
"userConsentDisplayName": "Access Azure AD SAML Toolkit",
"value": "user_impersonation"
}
],
"preAuthorizedApplications": []
},
"appRoles": [
{
"allowedMemberTypes": [
"User"
],
"displayName": "msiam_access",
"id": "8b292bda-39b6-4b77-849e-887565235bb0",
"isEnabled": true,
"description": "msiam_access",
"value": null,
"origin": "Application"
}
],
"info": {
"logoUrl": null,
"marketingUrl": null,
"privacyStatementUrl": null,
"supportUrl": null,
"termsOfServiceUrl": null
},
"keyCredentials": [],
"parentalControlSettings": {
"countriesBlockedForMinors": [],
"legalAgeGroupRule": "Allow"
},
"passwordCredentials": [],
"publicClient": {
"redirectUris": []
},
"requiredResourceAccess": [],
"verifiedPublisher": {
"displayName": null,
"verifiedPublisherId": null,
"addedDateTime": null
},
"web": {
"homePageUrl": "https://samltoolkit.azurewebsites.net/SAML/Consume?metadata=samltoolkit|ISV9.2|primary|z",
"redirectUris": [
"https://samltoolkit.azurewebsites.net/SAML/Consume"
]
}
},
"servicePrincipal": {
"id": "912729dd-97ae-4ceb-ade4-07bed3046486",
"deletedDateTime": null,
"accountEnabled": true,
"appId": "3c653ec4-4e4c-4820-8127-49e3889cad99",
"applicationTemplateId": "229946b9-a9fb-45b8-9531-efa47453ac9e",
"appDisplayName": "Azure AD SAML Toolkit",
"alternativeNames": [],
"appOwnerOrganizationId": "29a4f813-9274-4e1b-858d-0afa98ae66d4",
"displayName": "Azure AD SAML Toolkit",
"appRoleAssignmentRequired": true,
"loginUrl": null,
"logoutUrl": null,
"homepage": "https://samltoolkit.azurewebsites.net/SAML/Consume?metadata=samltoolkit|ISV9.2|primary|z",
"notificationEmailAddresses": [],
"preferredSingleSignOnMode": null,
"preferredTokenSigningKeyThumbprint": null,
"replyUrls": [
"https://samltoolkit.azurewebsites.net/SAML/Consume"
],
"servicePrincipalNames": [
"3c653ec4-4e4c-4820-8127-49e3889cad99"
],
"servicePrincipalType": "Application",
"tags": [
"WindowsAzureActiveDirectoryIntegratedApp"
],
"tokenEncryptionKeyId": null,
"samlSingleSignOnSettings": null,
"verifiedPublisher": {
"displayName": null,
"verifiedPublisherId": null,
"addedDateTime": null
},
"addIns": [],
"appRoles": [
{
"allowedMemberTypes": [
"User"
],
"displayName": "msiam_access",
"id": "8b292bda-39b6-4b77-849e-887565235bb0",
"isEnabled": true,
"description": "msiam_access",
"value": null,
"origin": "Application"
}
],
"info": {
"logoUrl": null,
"marketingUrl": null,
"privacyStatementUrl": null,
"supportUrl": null,
"termsOfServiceUrl": null
},
"keyCredentials": [],
"oauth2PermissionScopes": [
{
"adminConsentDescription": "Allow the application to access Azure AD SAML Toolkit on behalf of the signed-in user.",
"adminConsentDisplayName": "Access Azure AD SAML Toolkit",
"id": "00e7ef81-4deb-41d7-9ee3-90d4eba1e991",
"isEnabled": true,
"type": "User",
"userConsentDescription": "Allow the application to access Azure AD SAML Toolkit on your behalf.",
"userConsentDisplayName": "Access Azure AD SAML Toolkit",
"value": "user_impersonation"
}
],
"passwordCredentials": []
}
}
反馈
提交和查看相关反馈