locked
TFS Service: TF30063: You are not authorized to access ProjectName\DefaultCollection. RRS feed

  • Question

  • I get this error whenever I try to access the source code server.  I haven't changed any settings -- it started misbehaving yesterday.

    Thursday, August 30, 2012 6:48 PM

Answers

  • A few questions:

      • Are you still seeing the error?
      • How are you connecting (if from VS, what version? If from a browser, what browser)?
      • Is anyone else who has access to this account having issues?
      • If you do the following, does the problem still reproduce?

    1. Close all browser instances, Live Messenger instances, SkyDrive, Live Mesh, or anything else that is signed in with a Microsoft account (formerly "Live ID").
    2. Open Internet Explorer and visit LIVE.COM. Click ‘Sign Out’ in the top-right corner.
    3. Use Internet Explorer to delete all your Temporary Internet File and Cookies. If you do not want to delete ALL your cookies, then…
      a.    Determine the folder where your cookies are stored.
      b.    Open File Explorer to that folder
      c.    Search for all files with cookie & tfspreview in the name. Delete any you find. NOTE: you may need to enable display of hidden files and folders in File Explorer.
    4. Close all open instances of Visual Studio.
    5. Run the following from a .CMD in an elevated Command Prompt. Once that's complete, try your connection again.

    SET AppDataTF=%USERPROFILE%\Local Settings\Application Data\Microsoft\Team Foundation
    SET AppDataVS=%APPDATA%\Microsoft\VisualStudio
    IF EXIST "%AppDataTF%\1.0\Cache" rd /s /q "%AppDataTF%\1.0\Cache" > NUL
    IF EXIST "%AppDataTF%\2.0\Cache" rd /s /q "%AppDataTF%\2.0\Cache" > NUL
    IF EXIST "%AppDataTF%\3.0\Cache" rd /s /q "%AppDataTF%\3.0\Cache" > NUL
    IF EXIST "%AppDataTF%\4.0\Cache" rd /s /q "%AppDataTF%\4.0\Cache" > NUL
    IF EXIST "%AppDataVS%\8.0\Team Explorer" rd /s /q "%AppDataVS%\8.0\Team Explorer" > NUL
    IF EXIST "%AppDataVS%\9.0\Team Explorer" rd /s /q "%AppDataVS%\9.0\Team Explorer" > NUL
    IF EXIST "%AppDataVS%\10.0\Team Explorer" rd /s /q "%AppDataVS%\10.0\Team Explorer" > NUL
    IF EXIST "%AppDataVS%\11.0\Team Explorer" rd /s /q "%AppDataVS%\11.0\Team Explorer" > NUL
     


    Trevor Hancock (Microsoft)
    Please remember to "Mark As Answer" the replies that help.

    • Marked as answer by S Tonstad Wednesday, September 5, 2012 3:29 PM
    Friday, August 31, 2012 3:16 PM
    Moderator

All replies

  • Hi,

    When did you start seeing this issue?

    Prior to this, you were able to access your TFS Preview?

    Do you know what permission you have on TFS Preview?

    Thanks

    Anjana [MSFT]

    Thursday, August 30, 2012 9:35 PM
  • Hi Anjana --

    I do not know the exact time when it stopped working but I suspect it was around 8/27 or 8/28.  Yes, previously I was able to perform check-ins.

    Thursday, August 30, 2012 9:39 PM
  • A few questions:

      • Are you still seeing the error?
      • How are you connecting (if from VS, what version? If from a browser, what browser)?
      • Is anyone else who has access to this account having issues?
      • If you do the following, does the problem still reproduce?

    1. Close all browser instances, Live Messenger instances, SkyDrive, Live Mesh, or anything else that is signed in with a Microsoft account (formerly "Live ID").
    2. Open Internet Explorer and visit LIVE.COM. Click ‘Sign Out’ in the top-right corner.
    3. Use Internet Explorer to delete all your Temporary Internet File and Cookies. If you do not want to delete ALL your cookies, then…
      a.    Determine the folder where your cookies are stored.
      b.    Open File Explorer to that folder
      c.    Search for all files with cookie & tfspreview in the name. Delete any you find. NOTE: you may need to enable display of hidden files and folders in File Explorer.
    4. Close all open instances of Visual Studio.
    5. Run the following from a .CMD in an elevated Command Prompt. Once that's complete, try your connection again.

    SET AppDataTF=%USERPROFILE%\Local Settings\Application Data\Microsoft\Team Foundation
    SET AppDataVS=%APPDATA%\Microsoft\VisualStudio
    IF EXIST "%AppDataTF%\1.0\Cache" rd /s /q "%AppDataTF%\1.0\Cache" > NUL
    IF EXIST "%AppDataTF%\2.0\Cache" rd /s /q "%AppDataTF%\2.0\Cache" > NUL
    IF EXIST "%AppDataTF%\3.0\Cache" rd /s /q "%AppDataTF%\3.0\Cache" > NUL
    IF EXIST "%AppDataTF%\4.0\Cache" rd /s /q "%AppDataTF%\4.0\Cache" > NUL
    IF EXIST "%AppDataVS%\8.0\Team Explorer" rd /s /q "%AppDataVS%\8.0\Team Explorer" > NUL
    IF EXIST "%AppDataVS%\9.0\Team Explorer" rd /s /q "%AppDataVS%\9.0\Team Explorer" > NUL
    IF EXIST "%AppDataVS%\10.0\Team Explorer" rd /s /q "%AppDataVS%\10.0\Team Explorer" > NUL
    IF EXIST "%AppDataVS%\11.0\Team Explorer" rd /s /q "%AppDataVS%\11.0\Team Explorer" > NUL
     


    Trevor Hancock (Microsoft)
    Please remember to "Mark As Answer" the replies that help.

    • Marked as answer by S Tonstad Wednesday, September 5, 2012 3:29 PM
    Friday, August 31, 2012 3:16 PM
    Moderator
  • Hi Trevor.  Thank you for your reply.  When I have a free moment in the day I will try this out and let you know if I find success.
    Friday, August 31, 2012 5:37 PM
  • I am experiencing the same issue - I had a SharePoint BDC model retrieving the data from TFS preview project, but a few days ago (last week), I started getting the same error in the SharePoint logs.

    I have followed the procedure, but still I cannot connect to the TFS preview project. Also, I tried activating the alternate credentials for the account, accessing the TFS project with them - same result.

    It has been working before.

    SharePoint version running is SharePoint Server 2010 with the latest updates installed as of 3rd of September, 2012.

    Visual Studio version is 2012 Ultimate. DLL's used in the project are version 11.0.0.0. The code for connection is the following:

    var _credentials = new NetworkCredential(UserName, Password);
    
    TfsTeamProjectCollection server = new TfsTeamProjectCollection(_tfsUri, _credentials);
    
    server.EnsureAuthenticated();

    • Edited by Kiril Iliev Monday, September 3, 2012 10:37 AM more information
    Monday, September 3, 2012 10:27 AM
  • @S Tonstad: Get a chance to try it? Did it work?

    @Kiril, you are describing failure in code, but what if you just try to log into your account via an inPrivate Internet Explorer session using the same credentials you use in code - does it fail? What are the error messages you see in both instances (code and IE)? Screen shots are best. If this still fails, please provide your TFService account name (like XYZ.TFSPreview.com). Really appreciate it if you would spin a new thread too, if we need to continue troubleshooting this.


    Trevor Hancock (Microsoft)
    Please remember to "Mark As Answer" the replies that help.

    Wednesday, September 5, 2012 3:15 PM
    Moderator
  • Hi Trevor.  I had a busy week and the problem "resolved itself" -- but what I think really happened is that I satisfied steps 1 through 4 of your troubleshooting process.  Thank you for helping me with this problem.  I do a fair amount of work with Live Id in my server code and it's possible I entered a 'bad state'.  I'm really glad to have this working again -- thank you for your help!
    Wednesday, September 5, 2012 3:31 PM
  • Glad to be of service. :-)

    Trevor Hancock (Microsoft)
    Please remember to "Mark As Answer" the replies that help.

    Wednesday, September 5, 2012 3:32 PM
    Moderator
  • I'm getting the same issue...followed the steps listed and same problem. I'm running VS2012 Ultimate RTM on Windows 8 Professional RTM with a domain account that has been assigned a Microsoft ID (the same ID I use to login to TFS Preview).

    Keep your head in the Clouds as you're coding .NET http://azurecoding.net

    Friday, September 7, 2012 4:05 AM
  • I can login just fine on the web portal BTW...

    Keep your head in the Clouds as you're coding .NET http://azurecoding.net

    Friday, September 7, 2012 4:10 AM
  • My Office 365 Acct was causing disruption. Got an email from TFS Preview after login that my preferred email had been changed to my O365 Acct email address. I cleared all my O365 Cookies and was able to login from VS.

    Keep your head in the Clouds as you're coding .NET http://azurecoding.net

    Friday, September 7, 2012 5:19 AM
  • I am a user of Office365 and I encountered this issue as well.
    • Proposed as answer by Sudipto Sen Thursday, September 27, 2012 9:04 PM
    • Unproposed as answer by Sudipto Sen Thursday, September 27, 2012 9:05 PM
    Friday, September 7, 2012 5:59 AM
  • I am getting the same problem!

    I also have an office 365 and live id account, I've noticed that having the two is causing me no end of headaches on different things. This single sign on is a real mess and completely useless.

    I have to use chrome to get onto the Azure portal, it's just a pain.

    And now I cleared my IE cache, I can no longer get onto tfs preview.  I've tried all the above steps, but to no avail.

    I'm using windows 8, vs ultimate 2012, and I can't get this working again - I really need it. I noticed after signing out of live.com, if I re-open ie it is still signed in - but I've closed everything I can think of. Is it a metro app or something?

    Is there anything I can do, this multiple accounts not working is getting really annoying.


    Gareth Hewitt

    Sunday, October 28, 2012 8:04 PM
  • Hi Trevor

    The above script works for me always temporarily. After awhile I get the following error message from with in visual studio

    tf30063 you are not authorized to access from visual studio

    I am using vs 2010 and TFS 2010.


    Michael Vasquez

    Thursday, April 18, 2013 6:12 PM
  • Uhhh, I had to delete my cookies too.  They really need to make it easier to sign in and out.  I'm sure its very common that contractors are working on multiple TFS projects for different companies at the same time.

    dan

    Tuesday, July 2, 2013 8:04 PM
  • Thanks Trevor.  Was banging my head against the wall.  Clearing the cache, logging out of live, closing browsers and restarting VS did nothing, but after running those CMD commands I was back in business.  Thank you!!

    Wednesday, May 10, 2017 8:52 PM