Copied to clipboard

Flag this post as spam?

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


  • AnandBhopale 54 posts 172 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 32 posts 135 karma points
    Nov 25, 2021 @ 11:10
    Dale McCutcheon
    0

    Did you ever get this sorted?

  • Kiko Mats 13 posts 103 karma points
    Nov 25, 2021 @ 15:06
    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.

  • Dale McCutcheon 32 posts 135 karma points
    Jan 13, 2022 @ 15:20
    Dale McCutcheon
    0

    Hi,

    Enabling auto link will create umbraco users - i currently have this working on v9.0.

    Cheers Dale

  • Kiko Mats 13 posts 103 karma points
    Feb 07, 2022 @ 14:43
    Kiko Mats
    0

    Hello Dale,

    Thank you. How did you manage to make it work? I have an email address coming from a claim but I'm not sure how to tell the Auto-link function that this is the email address that needs to be auto-created.

    I wonder if you can share some sample codes.

    Regards.

  • Jamie Attwood 207 posts 501 karma points c-trib
    Mar 09, 2022 @ 13:40
    Jamie Attwood
    0

    Dale, I too am struggling with Autolinking in V9 using Auth0. I have all the authentication coming back fine, but it fails to create users.

    Did you specify anything in the OnAutoLinking or OnExternalLogin callbacks? The documentation on this is not helpful in anyway. I can't find out what's going on behind the scenes during the whole autolinking process.

    Any help appreciated!

    Jamie

Please Sign in or register to post replies

Write your reply to:

Draft