Skip to main content

Dear Community,

Comcell: 11.24.23

i want to created a workflow for the UseCase Mailbox User Offboarding.

 

The Form should be trigger with smtp Mail Variable and create a Backup and Restores the Mailbox as .pst to a UNC Path.

 

My big Problem here is that the Workflow doesnt understand the InstanceTyp → Exchange Mailbox there is no Q_xxx that suits for that in the List , when i try with Q_MSECH_MB the jobs goes in pending state with “Failed to enumarate iDataAgent…..”, there are only Q_MSEXCH for 2003,2k archiv,db available but nothing Office 365.

Or he says that the Client has not installed the Module ….

 

When you initiate a backup via GUI he uses as iDataAgent “Exchange Mailbox”.

 

Is there anyone out there who managed to get a running workflow for Office 365 Mailbox Backup.

 

Cheers,

Thomas

 

 

***Update***

I missed one , i also created a CV Ticket and i got the response O365 Apps are not supported for Workflow but its a normal backup command which should be supported.

 

Java Gui Workflow doesnt see the Exchange App Client

Command Center Workflow sees it.

 

Iam also trying now to execute an xml file for the backup job.

 

Cheers,

Thomas


Appreciate sharing back your discovery.  Assuming you are saving the job as a script/xml then using that as an input?

Let me know how it goes, and if you run into any other issues.


@RMcG - any thoughts on this one?


Hey,

 

just a short update , you can execute a backup with xml but you need a lot of information,

 

-smtpadress

-displayname

-alias

 

and the most problematic id to get the User GUID , maybe some knows how the get this  variable out of the database or via get request if you enter the smtp adress.

 

Cheers,

Thomas


@Thomas Gutjahr , This will get you the user guid:

https://api.commvault.com/#c1bd8440-84e7-786b-52e8-ed8b1ecdec84

Here’s the sample output:

{
"processinginstructioninfo": {
"attributes": "
{
"name": "exitval",
"value": "0"
}
]
},
"users": "
{
"description": "backup admin user",
"enforceFSQuota": false,
"idleTime": 0,
"agePasswordDays": 10,
"inheritGroupEdgeDriveQuotaSettings": true,
"email": "jdoe@company.com",
"edgeDriveQuotaLimitInGB": 100,
"lastLogIntime": 0,
"enforceEdgeDriveQuota": false,
"fullName": "Jane Doe",
"quotaLimitInGB": 100,
"loggedInMode": 0,
"inheritGroupQuotaSettings": true,
"enableUser": true,
"securityAssociations": {},
"associatedUserGroups": "
{
"userGroupId": 3,
"userGroupName": "View All"
}
],
"userEntity": {
"userGUID": "A08662B0-4F76-4939-BCAB-0D8B223A585C",
"userName": "jdoe",
"userId": 19
},
"userSecurity": {
"ownerAssociations": {}
},
"LinkedCommvaultUser": {}
}
]
}

@Mike Struening thank you very much for your help really appreaciate it.

Have a nice Christmas , once i am finished with my workflow i will share it for the community here maybe some needs this too.

cheers,

thomas


@Mike Struening thank you very much for your help really appreaciate it.

Have a nice Christmas , once i am finished with my workflow i will share it for the community here maybe some needs this too.

cheers,

thomas

That would be awesome Thomas, looking forward to it :grinning:


Hello,

@Mike Struening little bit time after i tried your answer but today i gave it a shot and found out that i only find local users/ ad users but not the Users from Exchange Online. Can it be that when he makes the backup request for the specified user , he queries the index apache solr/lucence db for the guid of the o365 user ? 

Or can you name me the table from the SQL DB in which this info is save i cant find it , would help me a lot.

 

Cheers,

Thomas


Appreciate you sharing the update (I unchecked the Best Answer mark).

So now the question is, do we store the O365 user GUID in our database, or is it referenced via the Job Results where we cache the data to get backed up?

I am not sure, so I’ll check with some colleagues and get them to reply here.


@Mike Struening sorry i miss clicked “Best Answer” and cant find the button for redo :D

 

Thank you for your effort and you are right , where does the O365 GUID gets stored.

 

Cheers

Thomas


I’ve reached out to the internal person who would know best.

I’ll keep you posted!


Hello,

We have an API, which will fetch you the users that have been configured for the Exchange Online client.

https://api.commvault.com/#496d3a11-7b7b-4b3d-b0f3-c77d4c772176

Using this API, one will be able to get the associated users, along with information like User GUID, display_name etc.
https://github.com/Commvault/cvpysdk/blob/9ecf050fe35282ec5b523b049d9f0f95bf8338f5/cvpysdk/subclients/exchange/usermailbox_subclient.py#L483


We can then use the below API to trigger a backup for the user:
https://api.commvault.com/#087b8946-c119-455b-abbe-45767509e219

sample input for Exchange Online backup job:

                mailbox_info = {
                    "aliasName": user "alias_name"],
                    "mailBoxType": user'mailbox_type'],
                    "databaseName": user'database_name'],
                    "displayName": user'display_name'],
                    "smtpAddress": user''smtp_address'],
                    "isAutoDiscoveredUser": True if user/'is_auto_discover_user'].lower() == 'true' else False,
                    "msExchRecipientTypeDetails": usere'mailbox_type'],
                    "exchangeVersion": usert'exchange_version'],
                    "exchangeServer": userh'exchange_server'],
                    "lastArchiveJobRanTime": user 'last_archive_job_ran_time'],
                    "user": {
                        "userGUID": usera'user_guid']
                    }
                }

For more info, you can check the Python SDK for the same at:

https://github.com/Commvault/cvpysdk/blob/master/cvpysdk/subclients/exchange/usermailbox_subclient.py#L1559


Reply