I'm developing a web application using Angular 4 (with TypeScript language) front-end side, and using AWS services back-end size. This application can be only accessed by a group of users (each has its own mail and password). This group of users is defined in AWS Cognito - User Pool. How can I have the entire list of these users with their properties to see her in the frontend? And how do I change their properties only frontend side?
I saw the JavaScript methods for AWS Cognito (https://github.com/aws/amazon-cognito-identity-js), but I didn't find anything for what I want to do.
I would like to use some method to show the full list of users with their properties (as seen in the AWS mangement console of Cognito) and that always, thanks to another method, my application it's able to edit some information as a "group" of a user.
Can anyone tell me if this is possible?
Amazon Cognito customers often need to export their users to facilitate more complex user queries, or to provide resiliency in case of regional failure or accidental deletion of their users.
To search for a user in the Amazon Cognito consoleChoose User Pools. Choose an existing user pool from the list. Choose the Users tab, and then enter in the user's username in the search field. Note that some attribute values are case-sensitive (for example, Username).
With Amazon Cognito, you can save user data in datasets that contain key-value pairs. Amazon Cognito associates this data with an identity in your identity pool so that your app can access it across logins and devices.
With a user pool, your app users can sign in through the user pool or federate through a third-party identity provider (IdP). Identity pools are for authorization (access control). You can use identity pools to create unique identities for users and give them access to other AWS services.
Late response but for those who will probably need it :
Create a new IAM policy, with the Cognito Listusers allowed
the code in JS
const cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider({
apiVersion: '2016-04-18',
region: "eu-central-1",
credentials: Auth.essentialCredentials(credentials)
});
var params = {
UserPoolId: environment.amplify.Auth.userPoolId, /* required */
AttributesToGet: [
"email",
],
Limit: 0
};
cognitoidentityserviceprovider.listUsers(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With