Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • AnandBhopale 53 posts 171 karma points
    Jun 01, 2021 @ 10:30
    AnandBhopale
    0

    Creating BackOffice user using Autolink option

    Hi,

    I have code which creates BackOffice user by using OnAutoLinking option

    However, the user is always created with Editor permissions.

    So, how to create user and add him to Administrator Group directly ?

  • Dale McCutcheon 31 posts 134 karma points
    1 week ago
    Dale McCutcheon
    0

    Did you ever get this sorted?

  • Kiko Mats 10 posts 100 karma points
    1 week ago
    Kiko Mats
    0

    Hello AnandBhopale,

    Good morning. Perhaps we can help each other. Based on the documentation (https://our.umbraco.com/Documentation/Reference/Security/auto-linking/index-v8_9). I think you just need to set the defaultUserGroups to AdminGroupAlias

                    AutoLinkOptions = new ExternalSignInAutoLinkOptions(
                        autoLinkExternalAccount: true,
                        defaultUserGroups: new[] { Constants.Security.AdminGroupAlias },
                        defaultCulture: null)
    

    However, I cannot test this working at the moment because my problem is it's not creating a new Umbraco User for me at all. How did you manage to get this working? Does enabling auto-linking automatically creates Umbraco Users?

    Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft