web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

While trying to retrieve the authorization groups, an error (1722) occurred

(0) ShareShare
ReportReport
Posted on by 5,248
I am working to get Active directory groups of current logged-in user.
i have successfully list the AD groups on AX forms by using
System.DirectoryServices.AccountManagement.GroupPrincipal
with help of following article:
http://www.exploreax.com/blog/blog/2014/09/08/active-directory-lookup-in-ax-2012/

now the situation is i am geeting following error when i try to get groups from JOB


System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DirectoryServices.AccountManagement.PrincipalOperationException: While trying to retrieve the authorization groups, an error (1722) occurred.

   at System.DirectoryServices.AccountManagement.AuthZSet..ctor(Byte[] userSid, NetCred credentials, ContextOptions contextOptions, String flatUserAuthority, StoreCtx userStoreCtx, Object userCtxBase)

   at System.DirectoryServices.AccountManagement.ADStoreCtx.GetGroupsMemberOfAZ(Principal p)

   at System.DirectoryServices.AccountManagement.UserPrincipal.GetAuthorizationGroupsHelper()

   at System.DirectoryServices.AccountManagement.UserPrincipal.GetAuthorizationGroups()

   --- End of inner exception stack trace ---

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   at Microsoft.Dynamics.AX.ManagedInterop.ClrBridgeImpl.InvokeClrInstanceMethod(ClrBridgeImpl* , ObjectWrapper* objectWrapper, Char* pszMethodName, Int32 argsLength, ObjectWrapper** arguments, Boolean* argsAreByRef, Boolean* isException)

also i have tried to get groups on Application Startup method and also getting following error:

Assembly containing type System.DirectoryServices.AccountManagement.ContextType is not referenced.Error executing code: AXNDomainViewer object not initialized.

PPlease Help ASAP


*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at

    Code 1722 means "The RPC server is unavailable". It seems that you can't communicate with your domain controller for some reason.

  • Verified answer
    Bashir Ahmad Profile Picture
    5,248 on at

    Yes it work by restarting AOS and Machine

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans