Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.
Gets the principal for the request.
Namespace: Microsoft.Dynamics.Commerce.Runtime
Assembly: Microsoft.Dynamics.Commerce.Runtime.Entities (in Microsoft.Dynamics.Commerce.Runtime.Entities.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function GetPrincipal ( _
requestContext As RequestContext _
) As CommercePrincipal
'Usage
Dim requestContext As RequestContext
Dim returnValue As CommercePrincipal
returnValue = requestContext.GetPrincipal()
public static CommercePrincipal GetPrincipal(
this RequestContext requestContext
)
[ExtensionAttribute]
public:
static CommercePrincipal^ GetPrincipal(
RequestContext^ requestContext
)
Parameters
- requestContext
Type: Microsoft.Dynamics.Commerce.Runtime.RequestContext
Return Value
Type: Microsoft.Dynamics.Commerce.Runtime.Data.CommercePrincipal
Instance of CommercePrincipal from the parameter cache.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type RequestContext. When you use instance method syntax to call this method, omit the first parameter. For more information, see b8020aae-374d-46a9-bcb7-8cc2390b93b6 or 175ce3ff-9bbf-4e64-8421-faeb81a0bb51.