Issue with adding users using Claims

Hello,
We have a SharePoint 2013 environment. We just introduced a third party claims provider. Before I ha a script that would provision a site collections and in the process add a user as a secondary site collection admin (script1). That was working just fine.
However, since we no longer user classic claim my script is now failing. I tried tweaking it by looking up the user's claims ID and plug it in the script but that is now working (script 2). Any idea how to get around this hurdle?
Thanks
script 1
$siteurl = http://mysite
$siteCollectionUrl = $siteurl
$site =new-object Microsoft.SharePoint.SPSite($siteCollectionUrl)
$web = $site.RootWeb
$secondayAdministrator = $web.EnsureUser("domain\username")
$site.SecondaryContact = $secondayAdministrator
Script 2
$siteurl = http://mysite
$siteCollectionUrl = $siteurl
$site =new-object Microsoft.SharePoint.SPSite($siteCollectionUrl)
$web = $site.RootWeb
$secondayAdministrator = $web.EnsureUser("i:0?.t|claim|domain\username")
$site.SecondaryContact = $secondayAdministrator

Hi Mike,
As you are using third party claim provider in SharePoint, then we cannot use the user name in the format domain\username when calling the EnsureUser API.
To be safe, we need to get the encoded claim value for the user and pass that into the EnsureUser method. 
Please check the PowerShell script below:
$claim = New-SPClaimsPrincipal -Identity domain\username -IdentityType WindowsSamAccountName
$web.EnsureUser($claim.ToEncodedString());
More reference:
http://blogs.technet.com/b/speschka/archive/2013/02/03/what-you-need-to-know-about-using-ensureuser-in-claims-based-web-apps-in-sharepoint-2010-and-sharepoint-2013.aspx
Best regards.
Thanks
Victoria Xia
TechNet Community Support

Similar Messages

  • Email issues with PC users

    I am a web project manager and email daily with both PC & Apple users. I use Apple Mail as my default program. I have had countless issues with the formatting of my email appearing differently to PC users on Outlook when sending or forwarding Rich Text emails. I try to stick with plain text but sometimes Rich Text is required.
    My current issue is orphan "B" characters are appearing through out the body of my email text when sending or forwarding Rich Text emails to PC users. This is NOT visible at all in my Apple mail program. This does not occur in plain text. I recently switched to sending in UTF-8 format - could this be the issue and if so what is the best solution.
    I am interested in feedback on the best way to efficiently communicate with PC users using mail and what the appropriate configurations to do so would be. I really don't want to have to switch from Apple mail to use another program but when dealing with co-workers and clients who are not tolerant of these errors I must find a solution.
    Thanks in advance to anyone that can help!
    Powerbook G4 (1.67 GHz PowerPC)   Mac OS X (10.4.8)  

    current issue is orphan "B" characters are appearing
    through out the body of my email text when sending
    or forwarding Rich Text emails to PC users. This is
    NOT visible at all in my Apple mail program. This
    does not occur in plain text. I recently switched to
    sending in UTF-8 format - could this be the issue
    and if so what is the best solution.
    See this note and see if Fix C helps:
    http://homepage.mac.com/thgewecke/woutlook.html

  • Is it possible to share an aperture library with different users using osx server.

    is it possible to share an aperture library with different users using osx server.

    Not really.  You should not be sharing an Aperture library over a network.  It's not designed for that and you'll likely corrupt your library at some point.

  • Compatibility issue with developer 6i using (64 bit) OS

    Hi All,
    I am using oracle 9iR2 (32 bit) on Linux Red Hat (32 bit) with developer 6i. Now i want to upgrade OS Red Hat (64 bit) and migrate database 10gR2 (64 bit).Is there any compatibility issue with developer 6i using 64 bit Red Hat OS / Oracle Database ?
    Thanks

    Is there any compatibility issue with developer 6i using 64 bit Red Hat OS / Oracle Database ?
    No, as long as developer 6i is at least patch 16. We use it.

  • Hi everyone, to use the portal with many users using the same portal user?

    I have an another question is possible to use the portal with many users using the same portal user with diferent roles in the same time?
    thanks

    Hi Israel,
    It is possible to have same user logged in through differnt terminals or browser windows. However if there are say 10 roles assigned to that user, all 10 will be visible in all the windows. However you may open and work on different roles.. in the different windows.
    Note that the real time collaboration features shall not be available if the same user logs in multiple times.
    Hope this is useful.
    Regards,
    Anagha

  • SSAS issue with Domain user account

    Hi
    I have SSAS 2008 R2 set up running on Windows Server 2012 Standard.
    The server is registered as a part of domain.
    I have had an issue of domain user accounts accessing to a cube and it's starting to get worse. There has been no problem with a local user account (I set up a few for testing purpose). 
    I ran the role report from BIDS Helper and it finds all the domain user accounts invalid. 
    It looks like SSAS is not talking well with the domain server (Windows 2003 server standard) to verify user credentials. But the thing is that everyone is ok with the domain server except for SSAS. IT does not have a clue what's going on here and everything
    is just pointing at me right now.
    I'd like to know if there is anyway to monitor that communication between SSAS and domain server for user credential verification and any guideline on how to resolve it. Most of time, it just works again..  like 10 minitues later.. it resolves by itself.
    But this time, not!!!
    All I know is that 1. Registering the server as a part of domain 2. use domain user account to set the security. 
    MY IT department has set up network monitoring tool and says that they are 100% percent working (No connection loss. It's monitoring Active directory as well). The application installed is 'ManageEngine Applications Manager' 
    I don't know what to do here. 
    P.S Will it be related something like 'Error
    while Add user to SSAS Server - The trust relationship between the primary domain and the trusted domain failed' but it's all the domain accounts including mine are not working.
    Cheers!!!

    First check your DNS servers setting on the server you have SSAS installed. You should only use the IP addresses of the DNS servers (e.g. Domain Controllers) of your domain. Active Directory relies on proper DNS server settings. Adding public DNS servers,
    even if they are on the bottom of the list, will mess up name resolving Active Directory names. This should have been done when IT had provisioned the server. Same goes for own workstation if you run your development/management software not on the server.
    Second make sure SSAS is running under a service account that has access to Active Directory. This can be either a domain account, the local system account, or the network service account. Running SSAS under a local account or the local service account will
    not work because local accounts do not have access to Active Directory. Running SSAS under either a Managed Service Account or a Virtual Account will not work because those features require the domain at least the Windows Server 2008 R2 functional
    level.
    Third make sure the account you use to log on to SSAS is a domain account and has appropriate permissions in SQL Server and SSAS. Local accounts and SQL Server account do not have access to Active Directory

  • Issue with AD users restricted to certain machines.

    Hi all,
    So, we seem to have a bit of an issue with user accounts that are restricted to logging in to certain machines only. While the user is permitted to log in to the machine (Windows lets them), our ISE server denies the login and the trace looks like this:
    24430 Authenticating user against Active Directory
    24441 Account not permitted to log on using the current workstation
    22057 The advanced option that is configured for a failed authentication request is used
    22061 The 'Reject' advanced option is configured in case of a failed authentication request
    11823 EAP-MSCHAP authentication attempt failed
    12305 Prepared EAP-Request with another PEAP challenge
    11006 Returned RADIUS Access-Challenge
    5411 No response received during 120 seconds on last EAP message sent to the client
    Has anyone seen this?
    Version 1.1.1.268.
    Thanks!
    -Ryan

    Well, as soon as I posted this, the idea hit me.
    We added the two ISE servers' machine accounts in AD to the machines that this user is permitted to log in to, and it works like a charm now. Apparently when a user logs in, ISE passes through a generic machine name (of itself) to AD, and it wasn't matching the list of allowed machines.

  • Big Issue with access applicationwise using SSO (windows AD)

    Hello BO Guru's,
    I have one big issue. i will try to explain my scenario here in brief.
    Scenario
    Currently we have 3 application A,B & C in production and SSO is configured using windows AD auth
    application -> User group -> Access -> Win AD group
    A | UG1 | Infoview | WD1
    B | UG2 | Infoview | WD2
    C | UG3 | WebIntl | WD3
    Here Infovew acces refers to: View objects & refresh object of applicationwise.
    WebI refers infoview access in addition to that copy document from corporate to personal folder\ category and scheduling access.
    Note: corporate Folder\category & universe\connection right given appropriately.
    Issue
    Suppose user a belong to WD1 means wuld have access to application A with infoview access. now after some time i.e. 2-3 days when user a is deleted from WD1 and and added to WD3 means would have access to application C with WEbi access. But issue is
    When user a logs on to infoview sometimes appllication A is also visible along with application C  which is not correct securitywise. 
    Could you please help me as how resolve it? and please share your views if anybody has faced same prob before 
    I think some where userwise security setting will be stored causing same.
    Thanks & Regards

    Many Thanks Julian Jimenez,
    FYI, I am on BOXI R3.1 with FP1.8
    I dont have access to SIA to restart CMS.
    any i will get it done.
    But what i was thinking of, there would be some cache maintned for user profiles  of last logins. so it may remember last user profile login which may causing apllication A still shown under corporate folder for him\her.
    But i am not able to get how can i achieve it?
    Please share some workaround if any body has faced same issue before.
    Thanks & Regards
    Edited by: naughtychintu19 on Sep 14, 2011 12:23 PM
    Edited by: naughtychintu19 on Sep 15, 2011 8:59 AM

  • Weird issues with file share using both SMB and AFP?

    I use my Xserve with 10.4 server primarily as a file server (with a huge RAID array attached via Ultra320 SCSI). I've served files from this server over SMB ("Windows" sharing) to both PCs and Macs for a few years now with no big issues. The files are being shared in a collaborative environment with extensive user accounts and ACLs set up.
    I would like to turn on AFP for these same file shares, so those accessing with a Mac can have the added benefits of AFP over SMB. However, I've heard some rumors of some complicated issues developing from the use of both AFP and SMB together on the same folders, in a mixed environment.
    The rumors I've heard are things that would happen rarely but enough for it to be significant. For example, a file created over SMB and then edited over AFP would have some problems being re-edited over SMB again, due to some complicated feature that the rumor is unable to explain (something with a resource fork or file locking?). Maybe something weird that just involves the Adobe Creative Suite?
    Anyway, I figured I'd throw this out there. Anyone who serves files over both protocols to a varied set of computers and applications having weird issues? Or is everything working for you? Thanks in advance.
    Message was edited by: dtemp

    Thanks for the responses!
    re:crop
    It's coming in as cropped with no way to fix it that I can see.
    Pressing space or opening in preview shows the full image but if it gets anywhere near Photoshop it comes in auto-cropped.
    I'm starting to this it's a bug and will be reporting it to Adobe.

  • Anyone else having an issue with TCP connections using iCloud for Windows?

    Hi,
    Before I asked this question, I did wait to see if any related questions came up, but none did, so I submit it now.
    On my admittedly older laptop running Windows 7 64b Home, I've run into difficulties with the iCloud for Windows app to the extent that I had to uninstall it.
    It would that, as my laptop was running, in the background, iCloudServices.exe would endlessly iterate TCP connections, which, while not actively sending or receiving any data, after some hours would number over 100 instances, taking up resources, and grinding my laptop's WiFi connection to a grindingly slow pace. I ended up, within the app, turning off everything, iCloud Drive and Photos, (I never used bookmarks), but still this would continue to occur.
    I contacted Apple Support, explaining what was going on, and they stated they only dealt with IOS and gave me a Microsoft Support number. When I called Microsoft support, I came more and more to the realization that the issue was specifically with the iCloud for Windows app, as that was the only software that was endlessly creating and not closing TCP connections as it was. How was Microsoft supposed to solve an issue with Apple code?
    So I called Apple back, whereupon they insisted it was a Microsoft issue. I explained other cloud services installed on the same computer were not having the same issue, it was unique to ICloudServices.exe. They stated they only dealt with IOS. I stated I purchased an iPad Air less than 7 months ago, and was trying to run iCloud in support of that.  They again stated they only dealt with IOS, and suggested I again try Microsoft. I asked them if it was reasonable to expect Microsoft to solve issues with Apple code? They said regardless, there was zero support offered for anything having to do with Windows, and all I could do was uninstall the app, which I did, though that did not feel very satisfactory to me. My thinking is, if Apple writes a Windows app in support of their hardware, they should offer support for it.
    Anyway, I was just wondering, is this an issue unique to me? or have others experienced a similar issue? I found this issue by opening the Windows Resource Monitor, looking under the Networking tab, and scrolling through the TCP Connections section to find 100+ concurrent iCloudServices.exe instances listed, whereas even Chrome, with multiple tabs and extensions, topped out at around 20.
    My one month old Desktop, DYI, sports a solid Asus 1150 MoBo, i7-4790k cpu, 16GB Ram, and an EVGA GTX 970 video card. I list some specs only to illustrate this computer has no hardware issues in comparison to my long in tooth laptop. On this desktop, running Win 8.1 Pro 64b,  at least as many, identifiably Apple, background service TCP connections are created even compared to Chrome, regardless of many tabs being open, many extensions, and even some related apps. Adobe does not even come close, though I run the full CC subscription. On this new computer, running Windows 8.1 Pro 64b, there are currently over 50 TCP connections and loopbacks that do not identify themselves, with just a - for the Image, and PID. With the experience on my laptop, I wonder how many of these are generated by Apple software, if not specifically iCloud software?
    The frustrating aspect of these connections is they seem in no way active, While the Chrome and Adobe connections can be seen to be transferring data, as long as I am not running iTunes, or so have my iPad actually plugged in, it seems 99% of the time these iCloudServices.exe connections are just taking up ports, neither sending nor receiving any data discernable to me under the Processes with Network Activity, or Network Activity lists, both displayed in the same window as the TCP Connections in the Windows Resource Monitor.
    Though I am fairly ignorant as regards coding, it seems as if there is no call to close a connection, very specifically, iCloudServices.exe, when it is no longer needed, and the next time a connection is needed, a new one is opened, rather than accessing the one previously opened. The only other reason I could imagine this might be occurring is if my Norton Internet Security software might mask and/or block the port after a certain time of inactivity.
    Anyone out there have any ideas or advice about this? Thanks in advance.

    Thanks jared,
    I'm still dealing with this issue through Apple. Some time after I posted this, I contacted Apple again. They did start a case up for me, as I was experiencing the same behavior on two different machines, with two different versions of Windows.
    So far it remains unsolved. I've logged iClouds for Windows on my desktop, which is brand new, then logged for awhile after completely uninstalling Norton Security Suite, depending on the Microsoft security for some time, and finally logged after I uninstalled iCloud for Windows, restarted, installed a clean download, and connected using a completely different test account, which Apple set up for me. None of this made any difference. Looking at the logs, it seems every 10 minutes, iCloudServices.exe creates a new TCP connection to confirm I'm using less than 5GB on iCloud, (which I am by a good margin, using less than 2GB), it seems this connection is not closed, and when the next iteration rolls around 10 minutes later, a new TCP connection is created. I come very close to having 6 TCP connections created per hour, until I restart my computer. This works out to... 6 x 24 = 144/day.
    Perhaps the article you posted will shed some further light on this. I'm thinking seeing the state of the connection through netstats, at the least, could help.
    For the last week, I've been putting a hold on further logging, as Apple wants me to create a new user account on one of my computers, install iCloud for Windows there, and log it running in the other account. This however basically means I cannot use my computer for a fair number of hours, and I've been busy enough with work the past week that I haven't the time or energy to afford to set this up and run it. I've had need of my computers too much for the past week.

  • Logitech Keyboard Issues with Fast User Switching

    I'm running OSX 10.4 on an 800 MHz iMac, and using a Logitech Cordless Navigator keyboard. The keyboard's main feature (for me) is the ability to have the function keys (F1-F12) automatically open applications and folders and such. When I have multiple accounts running though, this feature seems to be tied to whichever one I first logged into. If I switch accounts and try to use one of the keyboard shortcuts nothing happens where I am, but when I switch back to the original account I find that the keyboard has opened the program there. The keyboard types fine in the new account, and I can even change the preferences so the function keys do different things in the different accounts, but the extra functionality seems to be only available for whichever account logs in first.
    I realize this may just be a Logitech bug, but any ideas how to fix this? (Also even though I'm the only one using my computer this seems like a mild security issue, if theoretically another user could activate programs on my account without the password.)
    800 MHz iMac G4   Mac OS X (10.4.3)   768 MB RAM

    Logitech support is frustrating:
    Dear tajmahall14,
    Thank you for your recent inquiry about your Keyboards.
    I understand you are having issues with the settings for the function keys becoming non-functional when fast switching from one user account to another.
    Depending on the system configuration, the Fast User Switching may or may not work. Unfortunately this is not an issue I can address. You may need to contact Apple to see if they have a possible solution to your problem.

  • Firefox issues with multiple users on a single computer.

    I have an issue with Firefox and multiple users on my computer. There are two users setup and I'm running Win7 Ultimate x64. When the other user logs in, my settings in Firefox get screwed up somehow. Even if that user does not open Firefox.
    Examples of problems this causes:
    Gmail - Cannot load the standard interface, however it will load the HTML only interface.
    Facebook - Cannot post anything.
    vBulletin Forums - Some forums will no longer normally load - a text-only version loads as if I was browsing from a mobile device.
    There may be other issues, but these are the main ones. If I clear my cookies, cache and browsing and download history, then restart Firefox, everything works again.
    This seems to happen most often when the other user logs in, and uses Firefox to log on to their Gmail account.
    How can I fix this?

    Create a new profile as a test to check if your current profile is causing the problems.<br />
    See [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting&#58; Make a new profile]]
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins"
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    See http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Issue with "unknown user type 6" on Coherence 3.5.2

    Having an issue with a cluster which is running using an internally developed cluster starter tool. This tool, and the associated cluster, all use POF, and upon attempting to connect a non-storing member to the cluster from java, the following exception is raised...
    2011-07-11 15:54:58.338/2.469 Oracle Coherence GE 3.5.2/463p2 <Error> (thread=Cluster, member=n/a): This cluster node is
    configured to use serializer com.tangosol.io.pof.ConfigurablePofContext {location=application-pof-config.xml}, which ap
    pears to be different from the serializer used by Member(Id=1, Timestamp=2011-07-11 15:34:30.779, Address=10.74.82.193:8
    088, MachineId=11188, Location=site:INTRANET.BARCAPINT.COM,machine:ldnpsm020006423,process:80976,member:ldnpsm020006423:
    cacheserver:1).
    java.io.StreamCorruptedException: unknown user type: 6
    at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3289)
    at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2600)
    at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:348)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.readObject(Service.CDB:4)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$ServiceConfigMap.readObject(Grid.CDB
    :1)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$MemberConfigResponse.read(Grid.CDB:1
    3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:123)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.ClusterService.onNotify(ClusterServi
    ce.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:619)
    There is no serialiser configured in the cache config, instead we just set tangosol.pof.enabled=true, and set the pof config file to what is seen above. The thing which is very confusing about this error is that unlike other clients which we connect, and in fact the servers they connect to, this client never attempts to load the cache configuration file. The point at which this should happen, prior to pof loading, shows:
    2011-07-11 15:54:57.260/1.391 Oracle Coherence GE 3.5.2/463p2 <Info> (thread=Main Thread, member=n/a): Loaded cache conf
    iguration from "jar:file:/C:/Program%20Files/Oracle/coherence/3.5.2b463P2/lib/coherence.jar!/reports/report-group.xml"
    I have tried every combination of classpath entries I can think of, and no matter what, it never shows an attempt to load the application-cache-config.xml supplied in the startup. Does anyone have any experience with something like this?

    I guess your non-storing JAVA code does not specify -Dtangosol.pof.enabled=true and the -Dtangosol.pof.config =<POF file location> on joining the cluster. Post the startup java command and the complete logs.
    If application-cache-config is not loaded then coherence-cache-config.xml should be loaded by default and set -Dtangosol.coherence.cacheconfig=<application-cache-config>
    Cheers,
    NJ

  • Issue with SaveAs PDF using XSLFOP

    Hi, We have been using SaveAs method to generate PDF files using XSLFOP technique successfully, however, recently we ran into an issue where a very large report (about 100+ pages) generated a PDF file that could not be opened. We get the following error when we try to open the PDF file. “There was an error opening this document. The file is damaged and could not be repaired.” We tried it again with lesser range of dates and the proper PDF file is generated. (Report was about 35 pages). So we think it has something to do with the large volume of data which is causing the SaveAs method to generate the corrupt PDF file. Any help will be much appreciated !! Note : In the same folder where we have the EXE,PBD and DLLs, we have two subfolders fop-0.20.5 and jre. Thanks, Chirag Vora

    Hello Chirag,
    We submitted this problem to engineering 10 years ago with PowerBuilder 9 !!!
    It appears to be a problem with the FOP processor which needs a large amount of memory to complete the task. You can find similar issues with other tools than PowerBuilder:
    The oXygen-user October 2003 Archive by thread
    As a workaround, you can save the data in XSL-FO format within PowerBuilder, then use the fop.bat file in the \Shared\PowerBuilder\fop-0.20.4\ folder to convert it from outside PB.
    This will still give you the memory error until you modify the batch file to increase the maximum heapsize for java.
    In the fop.bat file change the java start command to : java -Xms64m -Xmx256m ...
    The option -Xms definies the initial heapsize for the java engine and -Xmx the maximum heapsize.
    We believe the default maximum heap is 64MB and this is what it is running into (or running out).
    Setting it to 256MB with -Xmx and it was able to complete
    HTH,
    Jacob

  • Issue with create user and issue with Java Development tab

    I have two issues with EP,
    1. When i login with Super Admin user, i am unable to Create any user from User Admin tab. Do i have to change the settings of the Super Admin? or is there any criteria for creating the user?
    2. How to assign any user the Java Development tab. Though i login with a super admin user i am unable to see the Java Development role and when tried to assign the role, there were no searches for that Java....

    Hi Adi,
    by default the super administrater has got all permissions. Thus you should be able to create portal users when using a user assigned to the portal group Administrators.
    In order to help you with your first question we need more information. Please describe the malfunction in detail. Have a look into the log files and post related error messages.
    Regarding your second question: You will find the java development role in PCD
    pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.pct.pdk/Roles/com.sap.pct.pdk.JavaDeveloper.
    If not, then you haven't installed the PDK business package in your portal.
    Go to service.sap.com, choose downloads and search the package (PDK should do it). Download the package, and deploy on your portal using SDM.
    Best regards,
    Martin

Maybe you are looking for

  • How to change exchange rate in VA02

    Dear Experts We have sales order which is having around 5 line item and in that 1st line item alone has been invoiced in January and later items still not invoiced In the month of February, the invoice for 1st line item has been cancelled , so to avo

  • Professional DVD in iDVD?  Or Atleast Decent Quality...

    Okay, I'm thinking of making a DVD and cramming a bunch of stuff on it. I will have a movie shot on a DSLR that will be about an hour and forty-five minutes. I want to save it out as an MP4/M4V which will probably be about 4gb. Then I want to ADD DVD

  • ISO 3rd party Apple service provider in the Inland Empire

    ISO 3rd party Apple vendor or savvy Machead who can take out a hard drive from an old MAC G4. Ideas anyone?

  • CS4 Programs Not Responding

    I have had Adobe Creative Suite installed on my Mac for 2 years now without issue. As of today, I cannot access any of my Adobe products. When trying, the program will open and take me to the last item I was working on. However, it immediately stops

  • Constantly shifting Infinity availability dates

    Is it possible to find out why the date for availability of Infinity continues to shift for my area?  I moved out of London to the Kent Coast in November 2012. I was with Virgin Media in London enjoying fibre optic speeds. I looked into the best opti