Entry points for secuirty privilege in D365 FO

Dear all,

I want to retrive the list of entry points for a security privilege in D365 FO using x++.

In Ax 2012, i am able to do using the below thread.

https://dynamicsuser.net/ax/f/developers/93245/privileges-and-entry-points-related-to-duty

But this is obsolete in D365FO, unable to find in which tables these are stored.

Any suggestions pls

You ask for a table, but shouldn’t you use the metadata API?

hi Martin,

i am not aware of API .can you please elaborate. Since in 2012 they are stored in a table, i thought of in which tables do these reside in D365!

If you want work with these things, I think you should learn the metadata API. It can give you the answer. Take a look:

using Microsoft.Dynamics.ApplicationPlatform.Environment;
using Microsoft.Dynamics.AX.Metadata.Storage;
using Microsoft.Dynamics.AX.Metadata.Storage.Runtime;
using Microsoft.Dynamics.AX.Metadata.MetaModel;

class GetSecObjects
{        
    public static void main(Args _args)
    {        
        str packageDir = EnvironmentFactory::GetApplicationEnvironment().Aos.PackageDirectory;
        var providerConfig = new RuntimeProviderConfiguration(packageDir);
        var provider = new MetadataProviderFactory().CreateRuntimeProvider(providerConfig);
        AxSecurityPrivilege privilege = provider.SecurityPrivileges.Read("CurrencyView");

        var enumerator = privilege.EntryPoints.GetEnumerator();

        while (enumerator.MoveNext())
        {
            AxSecurityEntryPointReference entryPoint = enumerator.Current;
            info(entryPoint.Name);
        }
    }

}

F&O and AX 2012 are very different systems, especially when we talk about architecture and metadata. For instance, AX 2012 stored metadata in a modelstore database, but there is no such a thing in F&O.