{"title":"SessionSettings.ProfileAppId([Guid]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/sessionsettings/sessionsettings-profileappid-method/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/sessionsettings/sessionsettings-profileappid-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/sessionsettings/sessionsettings-profileappid-method","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Gets or sets the ID of an extension, which provides a profile, in a SessionSettings object.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"SessionSettings.ProfileAppId([Guid]) Method","slug":"sessionsettingsprofileappidguid-method","at":0,"chars":2286},{"level":2,"title":"Syntax","slug":"syntax","at":198,"chars":160},{"level":2,"title":"Parameters","slug":"parameters","at":358,"chars":322},{"level":2,"title":"Return Value","slug":"return-value","at":680,"chars":138},{"level":2,"title":"Remarks","slug":"remarks","at":818,"chars":486},{"level":2,"title":"Example","slug":"example","at":1304,"chars":839},{"level":2,"title":"Related information","slug":"related-information","at":2143,"chars":143}],"text":"# SessionSettings.ProfileAppId([Guid]) Method\n> Version: _Available or changed with runtime version 1.0._\nGets or sets the ID of an extension, which provides a profile, in a SessionSettings object.\n## Syntax\n```al\n[ProfileAppId := ]  SessionSettings.ProfileAppId([NewProfileAppId: Guid])\n```\n> NOTE\n> This method can be invoked using property access syntax.\n## Parameters\nSessionSettings\nType: sessionsettings-data-type\nAn instance of the sessionsettings-data-type data type.\n*[Optional] NewProfileAppId*\nType: ../guid/guid-data-type\nSets the GUID of the extension that provides the profile. The value must be a valid GUID for an extension in the system table 2000000072 Profile.\n## Return Value\n*[Optional] ProfileAppId*\nType: ../guid/guid-data-type\nThe ID of the extension that is set in the SessionSettings object.\n## Remarks\nA profile can be included as part of an extension, instead of being defined as part of the base application. In order to properly identify a profile from an extension in the SessionSettings object, you must specify the extension ID, by using the ProfileAppId method, and the profile ID, by using sessionsettings-profileid-method.\nThe ProfileAppId property in a SessionSettings object corresponds to the App ID field in the in the system table 2000000073 User Personalization\n## Example\nThis example creates a SessionSettings object that is populated with the current client user's personalization data, and then uses the ProfileAppId method and ProfileId method to set the object to use the profile that has the ID 'MyExtensionProfile', which is provided in the extension that has the ID 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb'. Finally, the RequestSessionUpdate method sends a request to the client to abandon the current client session and start a new session that uses the new profile. This example requires a SessionSettings data type variable.\n```al\nvar\n  MySessionSettings : SessionSettings;\nbegin\n  MySessionSettings.Init;\n  MySessionSettings.ProfileId('MyExtensionProfile');\n  MySessionSettings.ProfileAppId('00001111-aaaa-2222-bbbb-3333cccc4444');\n  MySessionSettings.RequestSessionUpdate(false);\nend;\n```\n## Related information\nsessionsettings-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}