0 votes

Testing script located here https://www.adaxes.com/script-repository/export-data-from-onedrive-s568.htm

$tenantDN not Null

Throwing Error:

You cannot call a method on a null-valued expression. At line:15 char:1

  • $tenant = $Context.BindToObjectByDN($tenantDN)
  • 
      + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : InvokeMethodOnNull
by (1.7k points)

1 Answer

0 votes
by (185k points)

Hello Derek,

Do we understand correctly that you are executing the script in Windows PowerShell? The thing is that the script uses the built-in Adaxes variable $Context and thus can only be executed in a Business Rule, Custom Command or Scheduled Task. Also, please, make sure that the user for which the script is executed has an associated Microsoft 365 (former Office 365) tenant registered in Adaxes. For details, have a look at step 8 of the following tutorial: https://www.adaxes.com/tutorials_ActiveDirectoryManagement_ManageAndAutomateOffice365.htm#collapse1.

0

Verified Step 8. Alxo, as far as powershell, if i edit the script and view resolved value references value and copy that into PS, shouldn't i be able to test / run the script? That's how i am running it in PS.

0

Hello Derek,

Sorry for the confusion, but we are not sure what exactly you mean. Could you, please, post here or send us (support[at]adaxes.com) the exact script you are executing in Windows PowerShell?

0

i was able to get it working. it was a space that had to be removed in the URL.

Related questions

0 votes
1 answer

This is what I need to accomplish. Day one, I perform an export of the following four attributes for all Users in AD - DN, employeeID, telephoneNumber, location. Day 2, ... in which one of them has changed. It possible to achieve this using a scheduled task?

asked Mar 23, 2015 by sbanks (1.4k points)
0 votes
1 answer

Hi All, I see that Adaxes uses a local SQLite database for logging. However when a user enrols for password resets using a question and answer based authentication, where is ... some more sensitive than others so I was just wondering how it is handled? Thanks,

asked Apr 15 by antondubek (1.9k points)
0 votes
1 answer

I would like to be able to build a workflow whereby, after creating a user, a business rule will check certain user attributes/group memberships etc and then, if required, ... ways that this could be achieved to make a 'joined up' process? Thanks, Bernie

asked Aug 24, 2019 by Bernie (1.8k points)
0 votes
1 answer

Dear Support, Is it possible to connect to O365 tenant with admin accounts? Just with readonly access? Thanks!

asked Jul 5, 2019 by Dmytro.Rudyi (4.1k points)
0 votes
1 answer

I apologize if this is answered somewhere already. I searched but I couldn't find an answer. I'm setting up automated user account creation. I've set a number of ... . Am I missing something or trying to do this improperly? Many thanks for any assistance.

asked Mar 13, 2017 by leadbelly (740 points)
2,294 questions
2,050 answers
5,586 comments
58,838 users