{"title":"Codeunit 9033 Invite External Accountant, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/9033-invite-external-accountant/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"codeunit","id":9033,"name":"Invite External Accountant","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/9033-invite-external-accountant/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/9033-invite-external-accountant/source/","path":"src/Layers/W1/BaseApp/OtherCapabilities/AccountantPortal/InviteExternalAccountant.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"codeunit:5459":{"name":"JSON Management","url":"https://jonas-paprotka.de/ref/codeunit/5459-json-management/"},"codeunit:9012":{"name":"Azure AD Graph","url":"https://jonas-paprotka.de/ref/codeunit/9012-azure-ad-graph/"},"codeunit:9010":{"name":"Azure AD User Management","url":"https://jonas-paprotka.de/ref/codeunit/9010-azure-ad-user-management/"},"codeunit:1990":{"name":"Guided Experience","url":"https://jonas-paprotka.de/ref/codeunit/1990-guided-experience/"},"codeunit:9005":{"name":"Url Helper","url":"https://jonas-paprotka.de/ref/codeunit/9005-url-helper/"},"codeunit:6300":{"name":"Azure AD Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/6300-azure-ad-mgt/"},"codeunit:433":{"name":"Azure AD Tenant","url":"https://jonas-paprotka.de/ref/codeunit/433-azure-ad-tenant/"},"codeunit:1297":{"name":"Http Web Request Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/1297-http-web-request-mgt/"}},"procs":[{"name":"InvokeInvitationsRequest","line":50,"kind":"procedure","params":6,"steps":[[69,"call","InvokeRequestWithGraphAccessToken",4],[69,"call","GetGraphInvitationsUrl",0],[70,"ext","codeunit",5459,"InitializeObject",1],[71,"ext","codeunit",5459,"GetJSONObject",1],[73,"ext","codeunit",5459,"GetStringPropertyValueFromJObjectByName",3],[75,"ext","codeunit",5459,"GetStringPropertyValueFromJObjectByName",3],[76,"ext","codeunit",5459,"InitializeObject",1],[77,"ext","codeunit",5459,"GetJSONObject",1],[78,"ext","codeunit",5459,"GetGuidPropertyValueFromJObjectByName",3],[87,"call","GetMessageFromErrorJSON",1]]},{"name":"InvokeUserProfileUpdateRequest","line":92,"kind":"procedure","params":3,"steps":[[98,"call","GetGraphUserUrl",0],[102,"call","InvokeRequestWithGraphAccessToken",4],[105,"call","GetMessageFromErrorJSON",1]]},{"name":"InvokeUserAssignLicenseRequest","line":110,"kind":"procedure","params":3,"steps":[[116,"call","GetGraphUserUrl",0],[127,"call","InvokeRequestWithGraphAccessToken",4],[130,"call","GetMessageFromErrorJSON",1]]},{"name":"InvokeIsExternalAccountantLicenseAvailable","line":135,"kind":"procedure","params":2,"steps":[[148,"call","InvokeRequestWithGraphAccessToken",4],[148,"call","GetGraphSubscribedSkusUrl",0],[149,"ext","codeunit",5459,"TryParseJObjectFromString",2],[152,"ext","codeunit",5459,"GetArrayPropertyValueFromJObjectByName",3],[154,"ext","codeunit",5459,"InitializeCollectionFromJArray",1],[156,"ext","codeunit",5459,"GetCollectionCount",0],[159,"ext","codeunit",5459,"GetJObjectFromCollectionByIndex",2],[160,"ext","codeunit",5459,"GetStringPropertyValueFromJObjectByName",3],[162,"ext","codeunit",5459,"GetDecimalPropertyValueFromJObjectByName",3],[167,"ext","codeunit",5459,"GetStringPropertyValueFromJObjectByName",3],[169,"ext","codeunit",5459,"TryParseJObjectFromString",2],[171,"ext","codeunit",5459,"GetDecimalPropertyValueFromJObjectByName",3],[183,"call","GetMessageFromErrorJSON",1]]},{"name":"InvokeIsUserAdministrator","line":188,"kind":"procedure","params":0,"steps":[[192,"call","GetCurrentUserTokenClaim",1]]},{"name":"CreateNewUser","line":212,"kind":"procedure","params":1,"steps":[[225,"ext","codeunit",9012,"TryGetUserByObjectId",2],[226,"ext","codeunit",9012,"GetUserAssignedPlans",2],[234,"event","OnInvitationCreateNewUser",0],[235,"ext","codeunit",9010,"CreateNewUserFromGraphUser",1],[237,"event","OnInvitationCreateNewUser",0]]},{"name":"IsLicenseAlreadyAssigned","line":241,"kind":"procedure","params":1,"steps":[[246,"ext","codeunit",9012,"GetUserAssignedPlans",2]]},{"name":"TryGetGuestGraphUser","line":253,"kind":"procedure","params":2,"steps":[[262,"ext","codeunit",9012,"TryGetUserByObjectId",2]]},{"name":"UpdateAssistedSetup","line":268,"kind":"procedure","params":0,"steps":[[272,"ext","codeunit",1990,"CompleteAssistedSetup",2]]},{"name":"InvokeRequestWithGraphAccessToken","line":275,"kind":"procedure","access":"local","params":4,"steps":[[277,"call","InvokeRequest",5],[277,"ext","codeunit",9005,"GetGraphUrl",0]]},{"name":"InvokeRequest","line":280,"kind":"procedure","access":"local","params":5,"steps":[[291,"ext","codeunit",6300,"GetGuestAccessToken",2],[291,"ext","codeunit",433,"GetAadTenantId",0],[296,"ext","codeunit",1297,"Initialize",1],[297,"ext","codeunit",1297,"DisableUI",0],[298,"ext","codeunit",1297,"SetReturnType",0],[299,"ext","codeunit",1297,"SetContentType",0],[300,"ext","codeunit",1297,"SetMethod",1],[301,"ext","codeunit",1297,"AddHeader",2],[303,"ext","codeunit",1297,"AddBodyAsText",1],[305,"ext","codeunit",1297,"SendRequestAndReadTextResponse",5]]},{"name":"GetMessageFromErrorJSON","line":316,"kind":"procedure","access":"local","params":1,"steps":[[323,"ext","codeunit",5459,"InitializeObject",1],[324,"ext","codeunit",5459,"GetJSONObject",1],[325,"ext","codeunit",5459,"GetStringPropertyValueFromJObjectByName",3],[326,"ext","codeunit",5459,"InitializeObject",1],[327,"ext","codeunit",5459,"GetJSONObject",1],[328,"ext","codeunit",5459,"GetStringPropertyValueFromJObjectByName",3]]},{"name":"GetGraphInvitationsUrl","line":334,"kind":"procedure","access":"local","params":0,"steps":[[336,"ext","codeunit",9005,"GetGraphUrl",0]]},{"name":"GetGraphUserUrl","line":339,"kind":"procedure","access":"local","params":0,"steps":[[341,"ext","codeunit",9005,"GetGraphUrl",0]]},{"name":"GetGraphSubscribedSkusUrl","line":344,"kind":"procedure","access":"local","params":0,"steps":[[346,"ext","codeunit",9005,"GetGraphUrl",0]]}]}