<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarcrm.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/4049/sugar-on-demand-new-user-creation-via-api</link><description>Hi, I am working on a client requirement that is to create new user in sugar on-demand via api. I am trying to create user on my sandbox sugar via postman but i am getting not_authorized error. While if i do GET POST api calls to other module(Accounts</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/thread/20973?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 10:09:34 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:cd4be7ab-3e1c-4e7d-b6f8-8a20c967cec2</guid><dc:creator>Shameen Arshad</dc:creator><description>&lt;p&gt;Thanks Harald, yes my instance is sugar identity enabled, we have dropped this idea of creating users via api.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/thread/20967?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 08:26:44 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:862e24a8-f3a5-4c03-8559-6d7420f8bd28</guid><dc:creator>Harald Kuske</dc:creator><description>&lt;p&gt;Is your instanced already under control of SugarIdentity?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://support.sugarcrm.com/Documentation/SugarCloud_Services/SugarIdentity/"&gt;https://support.sugarcrm.com/Documentation/SugarCloud_Services/SugarIdentity/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With &lt;span&gt;SugarIdentity enabled&lt;/span&gt; you cannot create users in the instance any more via REST API.&lt;/p&gt;
&lt;p&gt;Check the returned access_token, if its length is much longer&amp;nbsp;than 36 chars&amp;nbsp;your&amp;nbsp;instance&amp;nbsp;is&amp;nbsp;&lt;span&gt;SugarIdentity enabled.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/thread/20953?ContentTypeID=1</link><pubDate>Tue, 06 Oct 2020 09:35:04 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:321fff41-7b28-40cd-816e-d72120cc4433</guid><dc:creator>Shameen Arshad</dc:creator><description>&lt;p&gt;Thank Neeraja,&lt;br /&gt;&lt;br /&gt;Well that&amp;#39;s also not do-able as that would create user in just sugar db, it wont be on cloud so i got error on seeing that db created record on cloud as it was not there.&lt;br /&gt;&lt;br /&gt;I need to know if we are able to create user with sugar identity programmatically.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/thread/20814?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 12:11:43 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:f7ff0b38-a3b4-4aa2-8a1d-87525f3e2734</guid><dc:creator>Neeraja P</dc:creator><description>&lt;p&gt;I am not sure if that is a good approach, that&amp;nbsp;defeats&amp;nbsp;the purpose of Sugar Identity :)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://support.sugarcrm.com/Documentation/SugarCloud_Services/SugarIdentity/SugarIdentity_Guide/#Best_Practices_When_Creating_Users"&gt;https://support.sugarcrm.com/Documentation/SugarCloud_Services/SugarIdentity/SugarIdentity_Guide/#Best_Practices_When_Creating_Users&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can also&amp;nbsp;check with Sugar Support if there is an alternative &amp;quot;automated&amp;quot; way to create users in Sugar Identity.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/thread/20812?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 11:38:01 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:8ec35ae6-c645-4336-bba9-adf1a64b2c77</guid><dc:creator>Shameen Arshad</dc:creator><description>&lt;p&gt;Well, yes i have checked Sugar Identity is enabled on this sugar instance.&lt;br /&gt;i think i may able to achieve my requirement via some custom api that will do direct db operation.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/thread/20811?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 11:27:35 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:026dd4c9-0811-4850-81b6-9d195f5bae5a</guid><dc:creator>Neeraja P</dc:creator><description>&lt;p&gt;Another thing to check is - are you using Sugar Identity? You won&amp;#39;t be able to create users via API if you have&amp;nbsp;that enabled.&lt;/p&gt;
&lt;p&gt;This wiki page describes how to check if Sugar Identity is enabled -&amp;nbsp;&lt;a href="/dev-club/b/dev-blog/posts/what-you-need-to-know-about-the-new-sugaridentity-service"&gt;https://sugarclub.sugarcrm.com/dev-club/b/dev-blog/posts/what-you-need-to-know-about-the-new-sugaridentity-service&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/thread/20810?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 11:25:39 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:22a24f42-6969-4df7-82c3-789bbe862b34</guid><dc:creator>Adrian Karlen</dc:creator><description>&lt;p&gt;I&amp;#39;d say&amp;nbsp;based&amp;nbsp;on that response that your user is not allowed to create other users.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/thread/20809?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 11:12:41 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:583f5a08-25f3-4732-aef6-7e6aff1860d8</guid><dc:creator>Shameen Arshad</dc:creator><description>&lt;p&gt;Hi @Neeraja&lt;/p&gt;
&lt;p&gt;Here is the postman response.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; &amp;quot;error&amp;quot;: &amp;quot;not_authorized&amp;quot;,&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; &amp;quot;error_message&amp;quot;: &amp;quot;You are not authorized to perform this action. Contact your administrator if you need access.&amp;quot;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;Yes i am using admin user but its not the super admin user. I am trying to get the creds for super admin so that i can check if i could do this with super admin user or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/thread/20808?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 11:09:32 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:77eafc72-eebf-49bd-bc50-6070759f0fe4</guid><dc:creator>Neeraja P</dc:creator><description>&lt;p&gt;Can you paste the&amp;nbsp;full error response? Sugar can throw different kind of errors with same&amp;nbsp;error key - &amp;quot;not_authorized&amp;quot;. The error description might be useful to understand what&amp;#39;s happening.&lt;/p&gt;
&lt;p&gt;Also, just a quick re-check - are you a System Admin in your sandbox instance?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/thread/20807?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 10:15:52 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:8c62c428-b2c7-47a1-aebc-f72a137296fb</guid><dc:creator>Shameen Arshad</dc:creator><description>&lt;p&gt;Did the auth call earlier and then used the token in the next call.&lt;br /&gt;&lt;br /&gt;i am making api calls using postman.&lt;br /&gt;I did auth call to sugar and got the token.&lt;br /&gt;Then used that token in my next api call for user creation in postman and got not_authorized error.&lt;br /&gt;&lt;br /&gt;While i do create new user within sugar it takes me to cloud settings and there i can do setup user fields.&lt;br /&gt;It looks like this needs to be something with cloud settings. or there migth be some other mechanism to create new users on sugar on-demand.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/thread/20806?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 10:11:49 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:edc34ffd-bd66-4cba-8575-55b221935d8a</guid><dc:creator>Adrian Karlen</dc:creator><description>&lt;p&gt;Is the auth- call setup on the create-call? or did you call it earlier and used the token?&lt;br /&gt;&lt;br /&gt;If you login with the user from the browser for example the token will be invalidated, could that be what&amp;#39;s happening?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/thread/20805?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 10:07:32 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:6c7d36b5-0930-4e76-89bd-de05ab08f53d</guid><dc:creator>Shameen Arshad</dc:creator><description>&lt;p&gt;i did create a token first and then used that token for further action. Same token worked for other modules but not for user creation. This is some permission issue, i need to know how can i get the access.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sugar On-Demand: New User Creation via API</title><link>https://sugarclub.sugarcrm.com/thread/20804?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 10:05:27 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:d1e8b200-4bf6-4c8a-a2d6-6ad6f8b021ce</guid><dc:creator>Adrian Karlen</dc:creator><description>&lt;p&gt;You need to set up an authentification call in postman to get an access token, this can be set up on the create call.&lt;br /&gt;&lt;br /&gt;The call should look something like:&lt;br /&gt;&lt;br /&gt;sugarurl/.../token&lt;br /&gt;&lt;pre class="ui-code" data-mode="json"&gt;{ 
    &amp;quot;grant_type&amp;quot;:&amp;quot;password&amp;quot;, 
    &amp;quot;client_id&amp;quot;:&amp;quot;sugar&amp;quot;, 
    &amp;quot;client_secret&amp;quot;:&amp;quot;&amp;quot;, 
    &amp;quot;username&amp;quot;:&amp;quot;username&amp;quot;, 
    &amp;quot;password&amp;quot;:&amp;quot;password&amp;quot;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>