# Get current user email

**URL:** <https://forum.camunda.io/t/get-current-user-email/27133>\
**Category:** Discussion & Questions\
**Tags:** cockpit, admin\
**Created:** [April 30, 2021, 1:10pm UTC](https://forum.camunda.io/t/get-current-user-email/27133 "2021-04-30T13:10:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kok](https://forum.camunda.io/user_avatar/forum.camunda.io/kok/32/14225_2.png) [@kok](https://forum.camunda.io/u/kok)\
**Post date:** [April 30, 2021, 1:10pm UTC](https://forum.camunda.io/t/get-current-user-email/27133/1 "2021-04-30T13:10:46Z")

</div>

Hi,

can someone give me a hint on how to get the Email of the current user?

For example, using embedded Form you can get the current user Name by this:

$scope.userName = $rootScope.authentication.name;

---

<div class="post-metadata">

**Author:** ![hassang](https://forum.camunda.io/user_avatar/forum.camunda.io/hassang/32/16498_2.png) [@hassang](https://forum.camunda.io/u/hassang)\
**Post date:** [April 30, 2021, 10:00pm UTC](https://forum.camunda.io/t/get-current-user-email/27133/2 "2021-04-30T22:00:18Z")

</div>

Hi @kok,  
Try below snip of code.

```
<script cam-script type="text/form-script">
inject([ '$rootScope', '$scope', 'camAPI', function($rootScope, $scope, camAPI) {

	var userName = $rootScope.authentication.name;
	var User = camAPI.resource('user');

	User.profile({id: userName}, function(err, data) {
		if (!err) {
			//alert('Data: ' + JSON.stringify(data));
			alert('Email: ' + data.email);
		}
	});
}]);
</script>
```

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [January 30, 2024, 1:02pm UTC](https://forum.camunda.io/t/get-current-user-email/27133/4 "2024-01-30T13:02:51Z")

</div>

Closed on January 30, 2024, 1:02pm UTC


