cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
michael-w
Frequent Visitor

Unable to create application user!

I'm trying to build a server daemon which runs periodically. According to docs, S2S authentication is preferred.

I follow this guide ,but in my environment step 5 is different from the guide.

In my environment, step 5 will open a modal telling me go to admin portal instead of opening a creation form, so I cannot create application user.

 

Is docs outdated? Or there is a new creation process?

 

michael-w_0-1611421207180.png

 

image.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
dpoggemann
Resident Rockstar
Resident Rockstar

Hi Michael,

 

Please review the following instructions, this is what we used to create the application user and it worked well for us.  https://powermaverick.dev/2020/08/10/create-application-user-in-dataflex-pro-cds/ 

 

Hope this helps you!

 

Thanks,

 

Drew

View solution in original post

ChrisPiasecki
Super User
Super User

Hi @michael-w,

I've experienced previously that trying to create an application user through the Environment settings in the admin center never works. I've had to use the legacy interface to setup application users.

 

  • Browse to the Maker Portal (make.powerapps.com).
  • Select your environment,
  • Click the gear in the top right, then Advanced settings. This will open up the legacy Dynamics 365 user interface.
  • Navigate to Settings > Security > Users.
  • Click Add in the command bar which will open up a new user form.
  • Switch the form to the Application user.
  • Fill in the required details then Save.
  • The Manage Roles button will now be available in the command bar on the form and you can apply the security roles needed. 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

8 REPLIES 8
dpoggemann
Resident Rockstar
Resident Rockstar

Hi Michael,

 

Please review the following instructions, this is what we used to create the application user and it worked well for us.  https://powermaverick.dev/2020/08/10/create-application-user-in-dataflex-pro-cds/ 

 

Hope this helps you!

 

Thanks,

 

Drew

View solution in original post

ChrisPiasecki
Super User
Super User

Hi @michael-w,

I've experienced previously that trying to create an application user through the Environment settings in the admin center never works. I've had to use the legacy interface to setup application users.

 

  • Browse to the Maker Portal (make.powerapps.com).
  • Select your environment,
  • Click the gear in the top right, then Advanced settings. This will open up the legacy Dynamics 365 user interface.
  • Navigate to Settings > Security > Users.
  • Click Add in the command bar which will open up a new user form.
  • Switch the form to the Application user.
  • Fill in the required details then Save.
  • The Manage Roles button will now be available in the command bar on the form and you can apply the security roles needed. 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

Thanks! It works! What important step I missed is switching the view filter to Application User. This is a crucial important step.

yogesh3188
Regular Visitor

Hi,

I am unable to create Application User in D365 CE.  E.g.,  User Name, Primary Email fields are locked.

 

yogesh3188_1-1611994467081.png

 

Hi @yogesh3188,

 

Can you confirm if you have the system administrator role? If so, check if the form security roles includes system administrator.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

Hi @ChrisPiasecki 

 

Yes, I have system administrator role and as of now Application user form is Display to everyone. Earlier, I used to create an Application User by entering User Name, Application Id, Full Name and Primary Email but now its allowing only Application Id.

FYI, now i have created the Application User by entering only Application Id. After selecting SAVE, the User Name, Application ID URI, Azure AD Object Id, Full Name, and Primary Email fields will auto-populate as per below.

 

User Name == 'Application Name + Application ID'@TenantID.com
Full Name == 'Application Name'
Primary Email == User Name

 

Reference: Use Single-Tenant server-to-server authentication 

I have the exact same issue 😞 Did you find any solution?

javiqb
New Member

I had the same issue and after exhausting all the search & tries i ended up creating Application User via SDK.
Though this requies a console app connected to Online deployment using tooling connector. Once console app is ready with nuget package for tooling connector following code will work.

using System;
using System.Net;
using System.Collections.Generic;
using System.Configuration;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Xrm.Tooling.Connector;

namespace updateData
{
    class Program
    {
        static void Main(string[] args)
        {
            if (ConfigurationManager.ConnectionStrings.Count > 0)
            {
                try
                {                    
                    string connString = ConfigurationManager.ConnectionStrings["NGIOL"].ConnectionString;
                    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;                    
                    CrmServiceClient conn = new CrmServiceClient(connString);
                    if (conn.IsReady)
                    {
                        IOrganizationService service = conn.OrganizationWebProxyClient != null ? (IOrganizationService)conn.OrganizationWebProxyClient : (IOrganizationService)conn.OrganizationServiceProxy;
                        if (service != null)
                        {
                            Console.Clear();Console.WriteLine("Connected to CRM :" + conn.CrmConnectOrgUriActual.ToString());

                            QueryExpression qecust = new QueryExpression("businessunit")
                            {
                                ColumnSet = new ColumnSet("name", "businessunitid"),
                                Criteria = { Conditions = { new ConditionExpression("parentbusinessunitid", ConditionOperator.Null) } },                                
                            };
                            EntityCollection eccust = service.RetrieveMultiple(qecust);
                            if (eccust.Entities.Count>0)
                            {
                                Entity bu = eccust.Entities[0];
                                EntityReference buref = new EntityReference(bu.LogicalName, bu.Id);
                                QueryExpression qeuser = new QueryExpression("systemuser")
                                {
                                    ColumnSet = new ColumnSet("systemuserid", "applicationid"),
                                    Criteria = { Conditions = { new ConditionExpression("applicationid",ConditionOperator.Equal, new Guid("<appid>")) } },
                                };
                                EntityCollection ecuser = service.RetrieveMultiple(qeuser);
                                if (ecuser.Entities.Count==0)
                                {
                                    Entity user = new Entity("systemuser");
                                    user["applicationid"] = new Guid("<appid>");
                                    user["firstname"] = "fname";
                                    user["lastname"] = "lname";
                                    user["internalemailaddress"] = "test@dummy.com";
                                    user["businessunitid"] = buref;
                                    service.Create(user);
                                }
                            }
                            }
                    }
                    else
                    {
                        throw new Exception(conn.LastCrmError);
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);Console.ReadLine();
                }
            }
        }
    }
}

connectionstring

<add name="NGIOL" connectionString="authtype=Office365;Url=https://<rgname>.crm.dynamics.com/;Domain=<dm>;Username=xxxx;Password=xxxx"/>

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,080)