How to Add Users to Dataverse Environment Before They Log In

Ryan Donaghy 45 Reputation points
2025-01-07T16:37:16.7033333+00:00

Hi All,

Apologies if this is in the wrong forum!

I am in a confusing situation and would appreciate an explanation of this process, as my understanding is obviously lacking.

I want to create a list of 100 Dataverse users that are registered in Entra. My goal is to roll out a Power App that will be used by these users.

The difficulty I am having is that while I can create my users through Logic Apps, it doesn't populate the azureactivedirectoryobjectid column. I assume this occurs because it is system-generated (sync with Entra).

My question is: How do I create users that are linked to Entra BEFORE they have logged into my environment?

I want the app ready to go for them.

The issue I am facing is that when I create a user through the Logic App, that user is disabled and lacks an azureactivedirectoryobjectid. Subsequently, when the actual user logs into the environment (they have licenses and security roles from within a team), the user gets duplicated.

I have created account records with ownership pointing to the original (disabled) user, which results in the actual user not being an owner of any record.

Here is what I am attempting:


{
  "type": "Http",
  "inputs": {
    "uri": "@{parameters('TargetDataverseEnvironment')}api/data/v9.0/systemusers",
    "method": "POST",
    "headers": {
      "Authorization": "Bearer @{body('Get_DV_Token')?['access_token']}",
      "Content-Type": "application/json",
      "Prefer": "return=representation"
    },
    "body": {
      "azureactivedirectoryobjectid": "@items('For_Each_User')?['azureId']",
      "firstname": "@item()?['firstname']",
      "lastname": "@item()?['lastname']",
      "bau_advisercuroid": "@item()?['bau_advisercuroid']",
      "bau_adviser": "@item()?['bau_adviser']",
      "internalemailaddress": "@item()?['internalemailaddress']",
      "businessunitid@odata.bind": "/businessunits(@{parameters('TargetDataverseBusinessUnit')})"
    }
  },
  "runtimeConfiguration": {
    "contentTransfer": {
      "transferMode": "Chunked"
    }
  }
}

Thanks,
Ryan

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
41,606 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. VarunTha 11,555 Reputation points Microsoft Vendor
    2025-01-08T04:56:31.67+00:00

    Hi Ryan Donaghy,
    Thank you for reaching out to us on the Microsoft Q&A forum.

    This topic is currently not supported in the Q&A forums.

    I recommend initiating a new discussion through the Microsoft Power Apps Community Moderators are readily available there to assist you and provide guidance.

    Please don't forget to Accept helpful answer and close this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.