Adding Azure Service Accounts

In this article

    You can add a new Microsoft Azure service account.

    Request

    POST https://<hostname>:4443/v6/AzureServiceAccounts

    Request Headers

    The request header must contain an authorization token of the current session.

    Request Body

    The request body must contain the following properties:

    Property

    Type

    Description

    applicationName

    string

    Specifies a name of Azure AD application associated with Microsoft Azure service account.

    description

    string

    Specifies a description of Microsoft Azure service account.

    applicationId

    string

    Specifies the Azure AD application ID.

    azureEnvironment

    string

    Specifies a Microsoft Azure region. The following values are available:

    • Global
    • Germany
    • China
    • Government

    azureTenantId

    string

    Specifies the Microsoft 365 organization ID in Microsoft Azure.

    applicationCertificate

    string

    Specifies the Base64 string of an SSL certificate that you want to use to access the Azure AD application.

    applicationCertificatePassword

    string

    Specifies the password for the specified certificate.

    applicationSecret

    string

    Specifies an application secret for connecting to Microsoft Azure.

    userCode

    string

    Specifies the code that you must copy and then specify on the Microsoft authentication portal.

    subscriptionIds

    string[]

    Specifies an array of subscriptions associated with a user account that was used to sign in to Microsoft Azure. For more information on how to get this parameter, see Getting Subscriptions.

    Request Example

    The following example shows how to add a new Microsoft Azure service account using the existing Azure AD application with application certificate.

    Request:

    POST https://abc.tech.local:4443/v6/AzureServiceAccounts

     

    Request Header:

    Authorization: Bearer <Access-Token>


    Request Body:

    {

    "applicationId": "2415230a-51ea-4e0d-a924-54c699a5431a",

    "azureEnvironment": "Global",

    "azureTenantId": "4468fde5-48b8-4f24-b3f0-ce8a4078ca3f",

    "applicationCertificate": "MIIJlAIBAzCCCVAGCSqGSIb3DQEHAaCCCUEEggk9MIIJOTCCBfoGCSqGSIb3DQEHAaCCBesEggXnMIIF4zCCBd8GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAg3cDJaX9AnIgICB9AEggTYogR0zaA/PYUKvpJwCvOdWpngoz4AH4rp6PxiayN0KHfNhW3e4O1D2O7Z/qAcUEs3Eseph08gonpzJmvdADfUzFclWgh1cICkDCbwviV2QznDEooekxEKH5XLAHtvlreIxUoJbRN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TdqjXkQJiA24ukGR+6wIAeQqM5+K5OqlRAG5MP97qGBVpkVhDGcvvACximDj+RtNX3TnVn2S+YN0H6P6i7aRJsCGs9gCAdhU/Z7+4Xf+KxBfJc0DDcfNIMqDOtS1KiIICFCwynyQyh3MeOdfv1wFrLOa/ljk3vKgg1hEHRpqoPhFxb0w7BdBvDCpgDqN1iy8v1STOiWtNaVsv7taJ3idmGPPb47LEwFp/NOJS37IJCSdzM6Fs+GjqXWx7om7GZoboAxp9WGeaABErhrN9fdr9cO8k+7HpQLBPW0Ib344gZqfe81/s8mU9yxADpNUyC9AnPxPvl9rwpHpxj0rCpty1q4V3YEkQHOQRCUVM4E0COdff6wL6XOmWm/xS79TrNSZ0gpBOaFS1cnVehsDoTbm6T/ZNmIPOb6fNmO/8dXoI6ErynSvTmbEJvUG0ppVs1BOc0DTOVfgI3uepKGJFvwjBp5u98orUTA7MB8wBwYFKw4DAhoEFPwC63vxL1bk1CCHbaUcPz+MYRg2BBSQ54B8/ca1iKG3pbx/MnWo+YGZnQICB9A=",

     

    "subscriptionIds":

    [

    "ab7092ea-8fa4-4705-b607-89f3dd09babd"

    ]

    }

    Response

    The server returns the following response to the client.

    Response Codes

    A successfully completed operation returns a response code 200 OK.

    Response Headers

    The response to this request contains the following headers. The response may also include additional standard HTTPS headers.

    Header

    Description

    Content-length

    The length of the response body.

    Content-type

    The media type and syntax of the response body message: application/json; charset=utf-8

    Response Body

    The response body contains the following properties:

    Property

    Type

    Description

    id

    string

    Specifies the Microsoft Azure service account ID.

    type

    string

    Specifies the Microsoft Azure service account type.

    displayName

    string

    Specifies the name of Azure AD application associated with Microsoft Azure service account.

    description

    string

    Specifies the description of Microsoft Azure service account.

    applicationId

    string

    Specifies the Azure AD application ID.

    applicationCertificateThumbprint

    string

    Specifies the application certificate thumbprint for connecting to Microsoft Azure.

    azureEnvironment

    string

    Specifies the Microsoft Azure region. The following values are available:

    • Global
    • Germany
    • China
    • Government

    azureTenantId

    string

    Specifies the Microsoft 365 organization ID in Microsoft Azure.

    lastModified

    UTC

    Specifies date and time of the latest modification of Microsoft Azure service account.

    Response Example

    Response:

    200 OK

     

    Response Body:

    {

         "id": "676705f3-b1bf-49bd-878f-9085865bfcf9",

         "type": "Azure",

         "displayName": "Application",

         "applicationId": "2415230b-51ea-4e2d-a924-54c700a5431a",

         "applicationCertificateThumbprint": "FF2577A7586ACAD713FEBA43C62B67C1603CF7EC",

         "azureEnvironment": "Global",

         "azureTenantId": "4568fse5-48b8-4f24-b3f0-ce8a4078ca3f",

         "lastModified": "2022-02-16T17:46:16.8070443Z"

    }