IPassportManager::get_Profile
IPassportManager::get_Profile
Retrieves a VARIANT value for a named attribute from a user's core profile.
Syntax
HRESULT get_Profile ( BSTR attributeName, VARIANT* pVal );
Parameters
- attributeName
[in] A BSTR specifying the name of the attribute to be retrieved. Attribute names for the core profile are determined by the schema in the Component Configuration Document (CCD).
- pVal
[out, retval] A pointer to a VARIANT value. The variant could be VT_BSTR, VT_I4, or another type, depending on which attribute was requested. It is up to the caller to check for type.
Return values
Returns one of the following values:
S_OK Success. Is also returned if the *pVal output is returned empty, the Profile has been tampered with, is invalid, or missing from this domain. PP_E_NO_SUCH_ATTRIBUTE The supplied attributeName argument is invalid for the core profile. Check the CCD file for valid attribute names. This also generates a specific event. PP_E_BAD_DATA_FORMAT The provided data was stored or flagged as an unsupported VARIANT type. Ordinarily, this would have been detected and prevented before setting a bad value. Allowed types are output as VT_UI1, VT_BSTR, VT_I2, VT_I4, or VT_DATE. PP_E_NOT_CONFIGURED No valid schema was detected. Check if Partner.xml CCD is available and has a schema section. E_INVALIDARG attributeName was null or empty.
Remarks
Attributes that return an empty value will return a VARIANT of type VT_EMPTY rather than zero, a zero-length string, or a missing value. Profile attributes may be empty because the user has not yet supplied a value. They may also be empty because of consent restrictions on distributing the user's profile. Only a few attributes are guaranteed to be non-empty.
This method will check for defined core profile attribute names in the CCD that is stored locally by the Passport Manager object. Then the attribute name is checked for in the calling domain's Profile cookie for the connected user, and the value is returned.
Note If you are developing in test mode, or if the Site ID for your site is not recognized by the .NET Passport Nexus, generic placeholder data will be returned for some of the core profile information.
See Also