+1 vote

Good morning Support, I'm trying to connect to our AzureAD service as specified in the GetAzureAuthAccessToken(String) section ofCloudServices SDK - https://www.adaxes.com/sdk/CloudServicesScriptContextClass/, but this fails with the following error: Cannot validate argument on parameter 'AccountId'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. Stack trace: at <ScriptBlock>, <No file>: line 22

I've been able to confirm that the AccountID returns as the following object: Softerra.Adaxes.Adsi.CloudServices.Office365.AdmO365UsernamePwdTenantCredential.AppId

Unfortunately I have no other reference to consult in my company's environment, so im not sure what I should be looking for.

At the end of the day, I'm working on a process to simply remove users from Cloud groups.

Thank you!

by (70 points)

1 Answer

0 votes
by (3.6k points)
selected by
Best answer

Hello,

Please, have a look at this script from our repository.

Should you have any further issues, please post here or send to support@adaxes.com your script in TXT format. Also, please specify whether you Microsoft 365 tenant is registered in Adaxes via an application account or a user account.

0

Thanks to your answer to the comment from Allili Omar on that script page, I've confirmed that our tenant is registered with user credentials, not as an application account. We'll be re-configuring that accordingly. Thank you!

+1

Please note, if you are using the GetOffice365Credential method anywhere in your scripts and change the authentication type of your registered tenant to application credentials, such scripts will stop working. You will need to update them to use GetAzureAuthAccessToken instead.

You can find whether GetOffice365Credential is used in any of your scripts using this script from our repository.

Related questions

0 votes
0 answers

Here is an example: In Azure the manager shows populated: In Adaxes it shows a blank:

asked Dec 2, 2022 by adaxes_user2 (40 points)
0 votes
1 answer

Can I manage the user that is user by Adaxes to connect to Active Directory with Privilege Access Management (PAM)? Since this user can change user's password, ... would like to manage this user so that PAM can change/rotate the password periodically

asked Nov 18, 2021 by fachmi (170 points)
0 votes
1 answer

Hi, I need to retreive a secret from a Azure Keyvault in a business rule. I have a powershell script that works if i run a external command. But it fails if ... at &lt;ScriptBlock&gt;, &lt;No file&gt;: line 20 Any sugestion? Kind regards Reidar Dick-Henriksen

asked Dec 6, 2023 by reidardh (20 points)
0 votes
1 answer

We are trying to avoid the issue of deleting accounts and resting accounts, we want to implement disconnecting the account by setting the immutable id to null on accounts we want to keep.

asked Aug 16, 2023 by Carlos (40 points)
0 votes
1 answer

I am unsure how to deal with this because of how Adaxes treats one identity account as two different objects, an AD and AzureAD user account, and both has different last logon values. What is a good way to combine the data?

asked Apr 22 by Daniel (160 points)
3,589 questions
3,278 answers
8,303 comments
548,131 users