You can embed virtual server ID information into an STS metadata exchange endpoint or a SAML and WS-Federation metadata exchange endpoint. This is useful for scenarios where partners prefer to retrieve metadata by sending one query parameter (PartnerSpId or PartnerIdpId) instead of two query parameters (PartnerSpId or PartnerIdpId and vsid).

  1. Construct a JSON object containing a key-value pair of the virtual server ID by using the following format:

    For example, if the virtual server ID is Engineering, the JSON object is:


  2. Base64url-encode the JSON object.

    For example, if the JSON object is {"vsid":"Engineering"}, the base64url-encoded value is:


    (For more information about base64url, see

  3. Insert the base64url-encoded value (prefixed with a forward slash) into the metadata exchange endpoints, described as follows:
    Federation metadata endpoint (/pf/
    Between /pf and /
    STS metadata endpoint (/pf/
    Between /pf and /

    For example, if the base64url-encoded value is eyJ2c2lkIjoiRW5naW5lZXJpbmcifQ, the metadata exchange endpoints embedding with the virtual server ID are:

    Federation metadata endpoint


    STS metadata endpoint