Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 release wave 1Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 Timeline
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
I want to do basic access management in NAV 2015 via Web Servie ODATA.
The goal ist to create a user (and connect to AD-User) and to assign one or more permissions from predefined roles.
I was able to create the user and set the windows login by publishing and using Page '9807'.
But I am not able to assign a permission to it. I am using Page '9808'.
Here the $metadata of OData Service
<Property Name="User_Security_ID" Nullable="false" Type="Edm.Guid"/>
<Property Name="Role_ID" Nullable="false" Type="Edm.String"/>
<Property Name="Company_Name" Nullable="false" Type="Edm.String"/>
<Property Name="_x003C_Description_x003E_" Type="Edm.String"/>
<Property Name="ETag" Type="Edm.String" ConcurrencyMode="Fixed"/>
When I do a POST request, I set the "User_Security_ID" and the "Role_ID" BASIS (the standard role) and it creates an entry, but ONLY with the security ID, while the Role_ID ist empty String ''.
The payload JSON:
<entry xml:base="http://...serviceHost.../" m:etag="W/"'TheETag'"" xmlns="http://www.w3.org/2005/Atom" xmlns:d="schemas.microsoft.com/.../dataservices" xmlns:m="schemas.microsoft.com/.../metadata">
<category term="NAV.UserPermissionRights" scheme="schemas.microsoft.com/.../scheme"/>
<link rel="edit" title="UserPermissionRights" href="Company('Northwind')/UserPermissionRights(Company_Name='',Role_ID='',User_Security_ID=guid'00000000-0000-0000-0000-000000000001')"/>
The entry is created and visible via GET and in NAV Client, but without Role_ID (...or Company_Name obviously). I would be able to fill in the role ID in NAV client directly, but that is not my goal.
The entry can be removed with DELETE and using correct eTag. Also tried PATCH or PUT the entry but the Role_ID does not change, probably because it is a key value...
Thought about association, but the Role_ID is only defined as String in metadata and no association is visible in Metadata
Tried to use Page '9807' (maybe name is 'UserCard?' in EN language). There appeared an association in metadat and I could use a POST request creatiung a permission. But the Role_ID was also not reacting and btw. the permission was only temporary...
I have no further idea how to create a Permission user<>role_ID.
Can anybody help me? Do I need a special page? I would be glad for any information.
Thank you in advance!
Hey Alex, did you found solution for this?!
no unfortunately I did not. We did not follow this topic further. I think you have to develop a Codeunit with C/AL inside NAV and connect a Webservice to it.
Business Applications communities