Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Inserting Azure Active Directory information into Word templates

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

I'm sitting in the IT department and we have created a word template that is being pushed out to all users, it looks like this (See atachment)

 

The "Letter Template KBH" has some data in the template "Username, LastName, Data, Department" etc.

 

Is it possible to create a Power automation or something else, that autofill’s this information "Username, Lastname, Data, Department" etc. with the user's data so if I open the template it will automatically autofill my name, last name, data, department etc. and that data is taken from Azure AD or Office 365

 

I can not seem to find anyone who have tried this before.

  • JH-30070657-0 Profile Picture
    on at
    Re: Inserting Azure Active Directory information into Word templates

    Hi thank you for your reply. 

    Based on the needs i have. can you think of a way to do this more easily. 

    Perhaps if the user can open a word template -> insert and then have the options to insert "username" "last name" etc which will be pre-defined.

    Can i setup some sort of template in word that holds user information that i define, and then when a user opens the word template, they can insert that template information? it’s a bit more manually. But can this be done? 

    hope it makes sense. 

  • Andrew_J Profile Picture
    1,962 Super User 2025 Season 1 on at
    Re: Inserting Azure Active Directory information into Word templates

    @Jonas-Hansen 

     

    Good to hear from you.  I hope the below helps.

     

    https://learn.microsoft.com/en-us/connectors/office365users/

     

    I think you are going to need to look at the PERSON field.  But it all hinges on if the data in the user profile is correct.  And only you know that.

     

    I do not think the autofil option will be there for you and I am saying this from you opening the Word Template file and seeing the fields populated in it.  Flow does nto work in that way but it will sucessfully populate the fields if you use a button flow as a trigger.  I you want the autofil feature then this is all I found but it does not use flow:

     

    https://answers.microsoft.com/en-us/msoffice/forum/all/how-do-i-insert-the-current-users-name-based-on/67288f8d-6786-41a5-a2a5-e15ce89af3a6

     

    You will need a premium licence for the Word Template feature.

     

    Regards,

     

    Andrew

  • JH-30070657-0 Profile Picture
    on at
    Re: Inserting Azure Active Directory information into Word templates

    Hi @Andrew_J 

     

    Thanks for your message. 

    Can you perhaps break it down what it takes to set this up? and also is this worth it? can it be done easier? i can not be the only one thinking this is a smart thing. 🙂 

  • Andrew_J Profile Picture
    1,962 Super User 2025 Season 1 on at
    Re: Inserting Azure Active Directory information into Word templates

    @Jonas-Hansen 

     

    I have not done what you are trying to do but as long as you are getting the user data from their profile before filling in the template then you should be fine.

     

    As for opening up the template file and seeing this autofill, I do not see this working.  You would have to run the flow, send it out ot your users.  However this could generate a lot of files that need to be stored temporaly during the run depending on your company size.

     

    I hope that helps. 

     

    Regards,

     

    Andrew

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >