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 (440 points)

1 Answer

0 votes
by (223k 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 (270 points)
0 votes
1 answer

Hello, I'd like to create a custom Adaxes report based on the following Logging Filters - I'm currently having to filter the logs manually each time I want to gather this ... would be easier to jump on a call to discuss this further? Thank you in advance!

asked Nov 16, 2020 by sirslimjim (400 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, 2020 by antondubek (440 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 (310 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 (850 points)
2,761 questions
2,494 answers
6,538 comments
1,482,502 users