# Generate Ketab & create service principal user

**URL:** <https://forum.ansible.com/t/generate-ketab-create-service-principal-user/32510>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [March 23, 2020, 10:39am UTC](https://forum.ansible.com/t/generate-ketab-create-service-principal-user/32510 "2020-03-23T10:39:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dudu.c](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@dudu.c](https://forum.ansible.com/u/dudu.c)\
**Post date:** [March 23, 2020, 10:39am UTC](https://forum.ansible.com/t/generate-ketab-create-service-principal-user/32510/1 "2020-03-23T10:39:03Z")

</div>

Hi all,

I need to work with a domain environment and for that, I need to perform 2 task

1. Create a service principal user on windows active directory domain
2. Generate keytab from windows active directory domain

Is it possible to perform the 2 tasks using ansible? I think that I can generate Keytab using ansible expect - but I dont know if it is the optimal way.

If you have such playbooks i will be happy if you can share them

Thanks
