0

I am using below code to create CRM Client

var conn = new CrmServiceClient($@"AuthType=ClientSecret;url={organizationUri};ClientId={clientId};ClientSecret={clientSecret}");

Above code is throwing me "UserNotLicensed :User does not have license to use with access" error

I have also followed this article for creating application user. which is not possible as user needs to be created using power platform.

https://www.ashishvishwakarma.com/Dynamics-365-Single-Tenant-Server-2-Server-Authentication-Azure-Active-Directory-Access-Token/

Mine looks like

enter image description here

Also, as shown in the article I am not able to navigate to "New User" form. It keeps redirecting to Office Admin page. where I am not sure if I have permission to create. Let's say I make Admin do that, will Admin have option to associate User with application ?

enter image description here

e2eDev
  • 301
  • 4
  • 12

1 Answers1

0

creating application user. which is not possible as user needs to be created using power platform.

what do you mean by this? You first need application user which should be created via Azure AD as app registration as mentioned in article and then you need to go to admin.powerplatfrom.com, select your env and then you see s2s users. Onye you click here it will give you list of all your s2s users (including the one you created). Add this s2s user in your env and assign particular security role (in most cases systemadmin). This should solve your issue

AnkUser
  • 5,421
  • 2
  • 9
  • 25
  • I have updated my question with more information. Hope this will give you more idea on my issue – e2eDev Oct 10 '22 at 14:54
  • 1
    I say your screenshots, as I mentioned in my answer the way of adding Application user is updated. Go to admin.powerplatform.microsoft.com then select your env and then you will see users on right hand sided select s2s users there in you can add the user and in addition you can provide security role as well. Note to do this you need have your own user as systemadmin rights. – AnkUser Oct 12 '22 at 07:16