web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Updating Project Onlin...
Power Automate
Answered

Updating Project Online Project OwnerID with Power Automate

(0) ShareShare
ReportReport
Posted on by 44

Hi,

We are trying to update the Project OwnerID value using the below flow:

screensh1.png

FormDigestValue is extracted by parsing the body of:

screensh2.png

 

@body('Parse_JSON_2')?['d']?['GetContextWebInformation']?['FormDigestValue']

 

And Outputs is the ID of the SharePoint user converted to string:

 

string(body('Get_ID')['d']['id'])

 

According StackOverflow: How Do I Change The Project Owner Using REST API all looks good, the result is:

screensh3.png

But Owner is not updated and 22 is the correct UserID in SharePoint/Project Online we need to be the Project Owner.

Does anyone could please indicate what is missing?

Thanks in advance!

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    I was able to perform the same steps as you minus the X-RequestDigest.

    Since I didn't see the whole flow my question was "Did you check out the project?  Did you check in and publish the project?"

    Here is my simple flow with a project hard coded in and the value "84" hard coded to see if it works since it appears you are building the correct variables.  I was able to change to "22" and back to "84" without issue.

     

    I hope you see something to help you.

    Flow for update ownerID.pngupdate owner ID.png

     

     

  • Verified answer
    Ximo Profile Picture
    44 on at

    Thanks!

     

    Yes, check out action happens before and check-in and publish afterwards, but found the issue to be not related to Power Automate, the particular user I was trying to change to Owner was on the SharePoint Site Collection/PWA with ID 22, the PWA was on SharePoint permissions mode, and this user was on Project Managers for Project Web App. 

     

    But... for some reason it was not listed in the Pick Resource dialog that pops up when manually changing Project Owner.  Once I manually added the user to the Enterprise Resource Pool and appeared in the Pick Resource dialog list, the flow worked flawlessly!

  • XylusSand Profile Picture
    10 on at

    For some clarity on this - I want to be able to use the claims ID, the email/UPN or the guid of the user. @Anonymous can you clarify your technique if you were providing any of those possibilities?

     

    John-Michael Scott

    GreenData.IO

  • Community Power Platform Member Profile Picture
    on at

    @GreenData-JMS  The OwnerID was available for the metadata command but Enterprise Custom Fields I couldn't get it to work.  Check my other post where I use the GUID for each and every ECF I wanted.  I was bringing financial data from a spreadsheet into each project.  Each ECF has a GUID and I used JSON if I recall.  Post a picture of your flow so I can help rather than hypothesize.  I'm guessing you are trying to update ECF's on a project but correct me if I'm way off.


    Read through this...and check the screen shot Update Project Custom Fields.

    https://powerusers.microsoft.com/t5/Building-Flows/Optimize-updateCurrencyProperty-or-updateTextProperty-POST-to/m-p/596648#M78744

     

     

     

  • XylusSand Profile Picture
    10 on at

    First we create a project - so 100% controlled experience:

     

    CreateProject.png

     

    Second - we want to check out the project created, so we insert a delay to wait for project creation to complete, after which we check out, and then attempt to use your technique to change the owner id. The presumption is that we are using Project Security rather than SharePoint Security:

    ChangeProjectOwner.png

     

    I provided the guid information to provide a sense for what we attempted. This failed as an action. 

     

    Does this make sense and am I missing something?

     

    Basically we are automating the act of project creation and we want to set the Project Owner - and ideally the Status Manager, but one bridge to cross at a time, you know? 🙂

     

    Much thanks!

    John-Michael 

     

     

  • XylusSand Profile Picture
    10 on at

    @Anonymous Just noting this directly so that you might get a notification 🙂 It's like a black art trying to set ownerid here. 

  • Community Power Platform Member Profile Picture
    on at

    OwnerID is not a Guid.  

  • Community Power Platform Member Profile Picture
    on at

    @GreenData-JMS I cannot remember how to find the value OwnerID for a user.  So for example, I'm in project Online as BillPricePMP and my OwnerID is 84 but I dont know how I find that value without owning a project.  So, if GreenData should own all the projects upon creation, create a dummy project (or pick an existing one) and make GreenData the owner.  Get the Project Guid.  Then in a browser, type in the following command "https://<your site>/sites/pwa/_api/ProjectServer/Projects('<your GUID with dashes')/Owner"  This will return the XML and will include the OwnerID for GreenData.  If you have XML Notepad or similar its easier to copy and paste but if not, Find in your browser "<d:Id " and it will find this 

    <d:Id m:type="Edm.Int32">84</d:Id>

    That is your OwnerID (for me its 84) which you can use to change project owners to GreenData

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 223 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 205 Most Valuable Professional

#3
harshdeol Profile Picture

harshdeol 167 Moderator

Last 30 days Overall leaderboard