With Flint's OFFICE365 Connector you can manage customer accounts, partner accounts, orders, subscriptions and licenses.

With this document, you will be able to use and work with the OFFICE365 Connector.

Design Aspects

Perform all standard application operations like manage customer accounts, partner accounts, orders, subscriptions and licenses operations through the Microsoft Office365.

Some of them are listed below:

  • Create Customers, Users and Orders.
  • List Customers, Users, Subscriptions, Licenses and Roles
  • Add Users, Subscriptions and Licenses
  • Remove Licenses
  • Activate, suspend, change and cancel subscriptions
  • Update users and password
  • The ability to set Connector execution timeouts
  • Synchronous / Asynchronous execution of the Connector

Connector Configuration

Add office365 connector

Configuration parameters
usernameUsername of your Microsoft Office365 account.true
passwordPassword of your Microsoft Office365 account.true
client-idMicrosoft Office365 account associated client-idtrue
client-secretMicrosoft Office365 account associated client-secrettrue
primary-domain-nameDomain name associate with Microsoft Office365 accounttrue
Example

 

{
  "client-id": "bs454b6-2d83-4q2c-bz16-0145f08923e1",
  "client-secret": "akrkvhoyodbhhpjncv/a2k3495ck/TDI=",
  "password": "Password",
  "primary-domain-name": "xyz.onmicrosoft.com",
  "username": "xyz@xyz.onmicrosoft.com"
}

Actions

Get-all-users

Get a list of all user accounts that belong to one of your customers

Request parameters
ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue
Response parameters
ParameterDescription
bodyOffice365 get-all-users info set
Example
 response = @call.connector("office365")
                 .set('action', 'get-all-customer-user-accounts')
                 .set('microsoft-id', "bd168b29-77da-4587-b584-b3cb019d1ca2")
                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body_string = JSON.parse(response.get('body'))  

Get-all-subscriptions

Gets a collection resource that contains all the subscriptions that belong to a customer.

Request parameters
ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue
Response parameters
ParameterDescription
bodyOffice365 get-all-users info set
Example
  response = @call.connector("office365")
                 .set('action', 'get-all-subscriptions')
                 .set('microsoft-id', "bd168b29-77da-4587-b584-b3cb019d1ca2")
                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body_string = JSON.parse(response.get('body'))  

Get-user-licenses

Gets a collection resource that contains all the licenses that belong to a user.

Request parameters
ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue
user-id

Microsoft-id associated to the user belong to provided customer-id

true
Response parameters
ParameterDescription
bodyOffice365 get-user-licenses info set
Example
@user_id = ["ajfg14-difti-2ikfkr","skgk6-doir7-2ckmgk"]     # id of the user Account
@user_id.each do |u_id|                                     # iterating user_id from array and put it in u_id
 
 response = @call.connector("office365")
                 .set('action', 'get-user-licenses')
                 .set('microsoft-id', "bd168b29-77da-4587-b584-b3cb019d1ca2")
                 .set('user-id',u_id)
                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body_string = JSON.parse(response.get('body'))  

Get-customer-roles

Get a list of all the roles/permissions attached to a user account.

Request parameters
 ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue
user-id

Microsoft-id associated to the user belong to provided customer-id

true
Response parameters
ParameterDescription
bodyOffice365 get-customer-roles info set
Example
 response = @call.connector("office365")
                 .set('action', 'get-user-licenses')
                 .set('microsoft-id', "bd168b29-77da-4587-b584-b3cb019d1ca2")
                 .set('user-id','skjg1-dkg4-ri3g-wiorig')
                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body = JSON.parse(response.get('body'))  

Get-available-licenses

Within a customer account, get a list of all the available subscriptions and the number of licenses available.

Request parameters
 ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue  
Response parameters
Parameter Description
bodyOffice365 get-available-licenses info set
Example
 response = @call.connector("office365")
                 .set('action', 'get-user-licenses')
                 .set('microsoft-id', "bd168b29-77da-4587-b584-b3cb019d1ca2")
                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body = JSON.parse(response.get('body'))  

List-subscription-add-ons

Gets a collection of add-ons that a customer has chosen to add to their Subscription.

Request parameters
 ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue  
id-for-subscriptionA ID corresponding to the subscription.true
Response parameters
Parameter Description
bodyOffice365 list-subscription-add-ons info set
Example
response = @call.connector("office365")
                 .set('action', 'get-user-licenses')
                 .set('microsoft-id', "bd168b29-77da-4587-b584-b3cb019d1ca2")
                 .set('id-for-subscription', 'dkfk4-wkfk3-dkrf5kf')
                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body = JSON.parse(response.get('body'))      

List-offer-id-add-ons

Gets a Offer resource that matches the offer ID.

Request parameters
 ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
offer-idA ID corresponding to the Offer.true
countryA ID corresponding to the Country(ISO2 code).true
Response parameters
Parameter Description
bodyOffice365 list-offer-id-add-ons info set
Example
response = @call.connector("office365")
                 .set('action', 'get-user-licenses')
                 .set('offer-id', "0CCA44D6-68E9-4762-94EE-31ECE98783B9")
                 .set('country', 'DE')
                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body = JSON.parse(response.get('body'))      

Create-customer

Creates a new customer.

Request parameters
 ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
microsoft-idMicrosoft-id associated to the customertrue
billing-first-nameThe first name.false
billing-last-nameThe surname.false
emailThe email address.true
cultureThe default local (e.g., en-US).true
language
The default language; 2 char language codes, (e.g., en, fr) are supportedtrue
State
The region of the address, often a state or province.true
country
The country code uses ISO2, 2-digit format.true
city
The city.true
address-line1
The first line of the address.true
address-line2
The second line of the address.false
address-line3
The third line of the address.false
postal-code
The postal code or ZIP code.true
phone-number
The phone number.flase
first-name
The given name of the addressee.true
last-name
The surname of the addressee.true
domain
The company profile information that represents the customer you wish to create.true
company-name
The registered company/organization name.true
Response parameters
Parameter Description
bodyOffice365 create-customer info set
Example
response = @call.connector('office365')
                    .set('action', 'create-customer')
                    .set('microsoft-id', 'bd168b29-77da-4587-b584-b3cb019d1ca2')
                    .set('billing-fisrt-name', 'zzztest')
                    .set('display-name', 'test')
                    .set('email', 'test@gmail.com')
                    .set('culture', 'EN-US')
                    .set('language', 'En')
                    .set('State', 'Berlin')
                    .set('country', 'DE')
                    .set('city', 'Berlin')
                    .set('address-line1', '1 Microsoft Way')
                    .set('postal-code', '98052')
                    .set('phone-number', '4255555555')
                    .set('first-name', 'mark')
                    .set('last-name', 'samule')
                    .set('domain', 'xyz123.onmicrosoft.com')
                    .set('company-name', 'CompanyName')
                    .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode # Exit status code
response_message =  response.message # Execution status message

#Office365 Connector Response Parameters
response_body = JSON.parse(response.get('body'))      

Create-order

Create an order for a customer.

Request parameters
ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
microsoft-idMicrosoft-id associated to the customertrue
line-item-number false
offer-idA ID corresponding to the Offer.true
friendly-name false
quantity false
Response parameters
Parameter Description
bodyOffice365 create-order info set
Example
response = @call.connector('office365')
                    .set('action', 'create-order')
                    .set('microsoft-id', 'bd168b29-77da-4587-b584-b3cb019d1ca2')
                    .set('line-item-number', '0')
                    .set('offer-id', "0CCA44D6-68E9-4762-94EE-31ECE98783B9")
                    .set('friendly-name', 'Nickname')
                    .set('quantity', 1)
                    .sync

    #Office365 Connector Response Meta Parameters 
    response_exitcode = response.exitcode # Exit status code
    response_message =  response.message # Execution status message

    #Office365 Connector Response Parameters
    response_body = JSON.parse(response.get('body'))      

Reset-user-account-password

Resetting a password of an existing user account for your customer.

Request parameters
ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
microsoft-idMicrosoft-id associated to the customertrue
user-id Microsoft-id associated to the user belong to provided customer-idtrue
user-passwordNew password to resettrue
friendly-force-change-passwordIt's a boolean field, Make it 'true' to reset passwordtrue
Response parameters
Parameter Description
bodyOffice365 reset-user-account-password info set
Example
 response = @call.connector("office365")
                 .set('action', 'reset-user-account-password')
                 .set('microsoft-id', "bd168b29-77da-4587-b584-b3cb019d1ca2")
                 .set('user-id','skjg1-dkg4-ri3g-wiorig')
                 .set("user-password", "Msoffice1$",) 
                 .set("force-change-password", true)
                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body = JSON.parse(response.get('body'))  

Add-user

Add new user account for your customer.

Request parameters
 ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue
usage-locationLocation of the user

 

true
display-nameDisplaytrue
user-passwordThe password.true
force-change-passwordIt's a Boolean field 
first-nameThe first name.true
last-nameThe last name.true
user-principal-nameThe principal name of user 
Response parameters
ParameterDescription
bodyOffice365 add-user info set
Example
response = @call.connector('office365')
                    .set('action', 'add-user')
                    .set('microsoft-id', 'bd168b29-77da-4587-b584-b5cb019d1ca2')
                    .set('principal-user-name', 'zzztest')
                    .set('display-name', 'test')
                    .set('usage-location', 'Berlin')
                    .set('first-name', 'mark')
                    .set('last-name', 'samule')
                    .set('user-password', 'Msoffice@123')
                    .set('force-change-password', true)
                    .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode # Exit status code
response_message =  response.message # Execution status message

#Office365 Connector Response Parameters
response_body = JSON.parse(response.get('body'))      

Update-user

update user account info.

Request parameters
 ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue
user-idMicrosoft-id associated to the user belong to provided customer-idtrue
usage-locationLocation of the userfalse
display-nameDisplayfalse
first-nameThe first name.false
last-nameThe last name.false
user-principal-nameThe principal name of user false
Response parameters
ParameterDescription
bodyOffice365 update-user info set
Example
response = @call.connector('office365')
                    .set('action', 'update-user')
                    .set('microsoft-id', 'bd168b29-77da-4587-b584-b5cb019d1ca2')
                    .set('user-id','skjg1-dkg4-ri3g-wiorig')
                    .set('principal-user-name', 'zzztest')
                    .set('display-name', 'test')
                    .set('usage-location', 'Berlin')
                    .set('first-name', 'mark')
                    .set('last-name', 'samule')
                    .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode # Exit status code
response_message =  response.message # Execution status message

#Office365 Connector Response Parameters
response_body = JSON.parse(response.get('body'))      

Delete-user

Delete an existing user account for your customer.

Request parameters
 ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue
user-id

Microsoft-id associated to the user belong to provided customer-id

true
Response parameters
ParameterDescription
bodyOffice365 delete-user info set
Example
 response = @call.connector("office365")
                 .set('action', 'get-user-licenses')
                 .set('microsoft-id', "bd168b29-77da-4587-b584-b3cb019d1ca2")
                 .set('user-id', 'skjg1-dkg4-ri3g-wiorig')
                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body_string = JSON.parse(response.get('body'))  

Add-licenses

To add new license to user account

Request parameters
 ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue
user-id

Microsoft-id associated to the user belong to provided customer-id

true
license-idId of the license, added to usertrue
Response parameters
ParameterDescription
bodyOffice365 delete-user info set
Example
response = @call.connector("office365")
                 .set('action', 'add-license')
                 .set('microsoft-id', "bd168b29-77da-4587-b584-b3cb019d1ca2")
                 .set('user-id', 'skjg1-dkg4-ri3g-wiorig')
                 .set('license-id', 'skjg1-ert7-ri6g-wio9ig')
                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body_string = JSON.parse(response.get('body'))  
@log.info("#{response_body_string}")

Remove-license

To remove license from user account

Request parameters
 ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue
user-id

Microsoft-id associated to the user belong to provided customer-id

true
license-idId of the license, added to usertrue
Response parameters
ParameterDescription
bodyOffice365 delete-user info set
Example
response = @call.connector("office365")
                 .set('action', 'remove-license')
                 .set('microsoft-id', "bd168b29-77da-4587-b584-b3cb019d1ca2")
                 .set('user-id', 'skjg1-dkg4-ri3g-wiorig')
                 .set('license-id', 'skjg1-ert7-ri6g-wio9ig')
                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body_string = JSON.parse(response.get('body'))  
@log.info("#{response_body_string}")

Activate Subscription

To activate subscription for customer account

Request parameters
 ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue

subscription-id

Id of the subscription, added for usertrue
Response parameters
ParameterDescription
bodyOffice365 activate-subscription info set
Example
response = @call.connector("office365")
                 .set('action', 'activate-subscription')
                 .set('microsoft-id', "bd168b29-77da-4587-b584-b3cb019d1ca2")
                 .set('subscription-id', 'skjg1-ert7-ri6g-wio9ig')

                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body_string = JSON.parse(response.get('body'))  
@log.info("#{response_body_string}")

Suspend-subscription

To suspend subscription for customer account

Request parameters
 ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue

subscription-id

Id of the subscription, added for usertrue
Response parameters
ParameterDescription
bodyOffice365 suspend-subscription info set
Example
response = @call.connector("office365")
                 .set('action', 'suspend-subscription')
                 .set('microsoft-id', "bd168b29-77da-4587-b584-b3cb019d1ca2")
                 .set('subscription-id', 'skjg1-ert7-ri6g-wio9ig')

                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body_string = JSON.parse(response.get('body'))  
@log.info("#{response_body_string}")

Change-subscription-quantity

To change quantity of subscriptions for customer account

Request parameters
 ParameterDescriptionRequired
connector_nameName of the OFFICE365 Connector to be configured.true
actionOperation to be performedtrue
customer-idMicrosoft-id associated to the customertrue

subscription-id

Id of the subscription, added for usertrue
quantityQuantity of subscriptionstrue
Response parameters
ParameterDescription
bodyOffice365 change-subscription-quantity info set
Example
response = @call.connector("office365")
                 .set('action', 'change-subscription-quantity')
                 .set('microsoft-id', "bd168b29-77da-4587-b584-b3cb019d1ca2")
                 .set('subscription-id', 'skjg1-ert7-ri6g-wio9ig')

                 .set('quantity', '1')
                 .sync

#Office365 Connector Response Meta Parameters
response_exitcode = response.exitcode                #Exit status code
response_message = response.message                  #Execution status messages
 
#Office365 Connector Response Parameters
response_body_string = JSON.parse(response.get('body'))  
@log.info("#{response_body_string}")
  • No labels