Skip to content

GetUserId

Source: src/AWS/IdentityCenter/GetUserId.ts

Runtime binding for the GetUserId operation (IAM action identitystore:GetUserId), scoped to one Instance.

Resolves a user’s UserId from a unique attribute (e.g. the user name) — the canonical login-to-id lookup for apps federated through Identity Center. The instance’s IdentityStoreId is injected from the binding. Provide the implementation with Effect.provide(AWS.IdentityCenter.GetUserIdHttp).

// init — bind the operation to the Identity Center instance
const getUserId = yield* AWS.IdentityCenter.GetUserId(instance);
// runtime
const { UserId } = yield* getUserId({
AlternateIdentifier: {
UniqueAttribute: {
AttributePath: "userName",
AttributeValue: "jdoe",
},
},
});