Skip to content

Commit

Permalink
Added listServicePrincipalId (#17068)
Browse files Browse the repository at this point in the history
* Added listServicePrincipalId

* Fixed few errors

* Fixed spelling

* Fixed few errors

* Fixed few errors

* Added listServicePrincipalId

* Fixed one error

* Fixed few errors

* Fixed error

* Fixed error

* Updated tag to trigger a build

* Fixed spelling

* Fixed comment

* Changed from Post to get to work in ARM template

* fixed failure

* fixed failure

* fixed warning

* Refferred ProxyResource

* Fixed ProxyResource and another comment

* Added systemData for ServicePrincipal

* Added Collection GET for Singleton

* Fixed error and warnings

* Fixed PrettierCheck error
  • Loading branch information
ikanni authored Feb 10, 2022
1 parent becbf3c commit 644beb7
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1283,6 +1283,93 @@
"application/json"
]
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals": {
"get": {
"tags": [
"servicePrincipals"
],
"operationId": "ServicePrincipals_ListBySubscription",
"description": "Get the Automanage AAD first party Application Service Principal details for the subscription id.",
"x-ms-examples": {
"List service principal by subscription": {
"$ref": "./examples/listServicePrincipalBySubscription.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Returns the Automanage ADD first party Application Service Principal details for the subscription.",
"schema": {
"$ref": "#/definitions/ServicePrincipalListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": null
},
"produces": [
"application/json"
],
"consumes": [
"application/json"
]
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals/default": {
"get": {
"tags": [
"servicePrincipals"
],
"operationId": "ServicePrincipals_Get",
"description": "Get the Automanage AAD first party Application Service Principal details for the subscription id.",
"x-ms-examples": {
"Get service principal": {
"$ref": "./examples/getServicePrincipal.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Returns the Automanage ADD first party Application Service Principal details for the subscription.",
"schema": {
"$ref": "#/definitions/ServicePrincipal"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
"produces": [
"application/json"
],
"consumes": [
"application/json"
]
}
}
},
"definitions": {
Expand Down Expand Up @@ -1611,6 +1698,57 @@
"description": "Error message, if any, returned when deploying the resource."
}
}
},
"ServicePrincipalListResult": {
"description": "The list of ServicePrincipals.",
"type": "object",
"properties": {
"value": {
"description": "The list of servicePrincipals.",
"type": "array",
"items": {
"$ref": "#/definitions/ServicePrincipal"
}
}
}
},
"ServicePrincipal": {
"description": "The Service Principal Id for the subscription.",
"type": "object",
"properties": {
"properties": {
"title": "Properties",
"x-ms-client-flatten": true,
"$ref": "#/definitions/ServicePrincipalProperties",
"description": "The Service Principal properties for the subscription"
},
"systemData": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData",
"readOnly": true,
"description": "Azure Resource Manager metadata containing createdBy and modifiedBy information."
}
},
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource"
}
]
},
"ServicePrincipalProperties": {
"description": "The Service Principal properties for the subscription.",
"type": "object",
"properties": {
"servicePrincipalId": {
"type": "string",
"readOnly": true,
"description": "The Service Principal Id for the subscription."
},
"authorizationSet": {
"type": "boolean",
"readOnly": true,
"description": "Returns the contributor RBAC Role exist or not for the Service Principal Id."
}
}
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parameters": {
"subscriptionId": "mySubscriptionId",
"api-version": "2021-04-30-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/subscriptionId/providers/Microsoft.Automanage/servicePrincipals/default",
"name": "default",
"type": "Microsoft.Automanage/ConfigurationProfileAssignments",
"properties": {
"servicePrincipalId": "<servicePrincipalId>",
"authorizationSet": true
},
"systemData": {
"createdBy": "SYSTEM",
"createdByType": "User",
"createdAt": "0001-01-01T00:00:00.00Z",
"lastModifiedBy": "SYSTEM",
"lastModifiedByType": "User",
"lastModifiedAt": "0001-01-01T00:00:00.00Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@
"operation": "Microsoft.Automanage/configurationProfileAssignments/reports/read",
"description": "Get report for configuration profile assignment."
}
},
{
"name": "Microsoft.Automanage/servicePrincipals/read",
"display": {
"provider": "Microsoft Automanage",
"resource": "Microsoft.Automanage/servicePrincipals",
"operation": "Microsoft.Automanage/servicePrincipals/read",
"description": "Read the Automanage AAD first party service principal id and authorizationSet for the subscription. This service principal id is used to grant the Contributor RBAC permission to Automanage AAD first party Application."
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"subscriptionId": "mySubscriptionId",
"api-version": "2021-04-30-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"id": "/subscriptions/subscriptionId/providers/Microsoft.Automanage/servicePrincipals/default",
"name": "default",
"type": "Microsoft.Automanage/ConfigurationProfileAssignments",
"properties": {
"servicePrincipalId": "<servicePrincipalId>",
"authorizationSet": true
},
"systemData": {
"createdBy": "SYSTEM",
"createdByType": "User",
"createdAt": "0001-01-01T00:00:00.00Z",
"lastModifiedBy": "SYSTEM",
"lastModifiedByType": "User",
"lastModifiedAt": "0001-01-01T00:00:00.00Z"
}
}
]
}
}
}
}

0 comments on commit 644beb7

Please sign in to comment.