» » X auth token vs cookie recipe

X auth token vs cookie recipe

X auth token vs cookie recipe

The scenario may be the following: I have to execute a federated authentication of the user (which utilizes his college account) in to the Sharepoint site of his college and also to obtain both FedAuth and rtFa cookies (which i've to pass through to SharePoint REST webservices to be able to access sources).

I made some attempts but there's a minimum of a problem in every one:

1) Using Microsoft.SharePoint.Client library

By doing this I get the FedAuth cookie but I'm not able to obtain the rtFa cookie .

How do i obtain the rtFa cookie at this time? Can One intercept the HTTP request involved with this kind of operation (i.e. context.ExecuteQuery()) -- which presumably offers the rtFa cookie within the headers? Or, can one obtain the rtFa cookie by only leveraging around the FedAuth cookie?

2) Using MsOnlineClaimsHelper

This can be a assistant class that exist on the web (e.g. here blog.kloud.com.au/tag/msonlineclaimshelper/ ).

These kinds, because it is, works together with normal authentication but fails with federated authentication .

And So I adjusted it to make it operate in this situation. As lengthy when i understand, the steps would be the following:

  1. Authenticate using password towards the STS ADFS service from the college (the "federated party" or even the ISSUER) -- here the Relying Party is Sharepoint O365 STS ("https://login.microsoftonline.com/extSTS.srf ")
  2. When the auth succeeds, I recieve back a SAML assertion that contains the claims along with a security token
  3. Now, I authenticate towards the SharePoint site by passing the safety Token
  4. When the token is recognized, I recieve back an answer containing the 2 cookies (FedAuth and rtFa)

I'm not a specialist within this matter, and that i announced the next code:

This is actually the code that calls the technique above and then try to get FedAuth and rtFa from credentials in 2 steps (step one: get SAML token from Federated Party step two: pass token from Federated Party to Sharepoint):

I got back a SAML token in the college STS. However, when parsed, the resulting SecurityToken doesn't have security keys (i.e. the SecurityKeys collection is empty)

Without any keys, I recieve on GetO365BinaryTokenFromToken() however when I attempt to transmit the token towards the SharePoint Authentication service -- I recieve the next error: "The signing token Microsoft.IdentityModel.Tokens.Saml2.Saml2SecurityToken doesn't have keys. The safety token can be used inside a context that needs it to do cryptographic operations, however the token contains no cryptographic keys. Either the token type doesn't support cryptographic operations, or even the particular token instance doesn't contain cryptographic keys. Look at your configuration to make sure that cryptographically disabled token types (for instance, UserNameSecurityToken) aren't specified by a context that needs cryptographic operations (for instance, an endorsing supporting token)."

I believe there are several configuration problems that I am unable to control directly, on sides (the college STS ADFS and also the Sharepoint STS).

Hopefully more expert people will bring clearness within this process as well as provide advice to really get this to scenario work.

File download function

Using the following function, I can download personal files (given an URL for example https://myfederatedparty.sharepoint.com/sites/MYSITE/path/myfile.pdf ) by issuing Both FedAuth and also the rtFa cookie. If I don't pass the rtFa cookie, I recieve an "Unauthorized" response.

Actually, only FedAuth cookie is required with regards to SharePoint Online/Office 365 authentication.

The FedAuth cookies enable federated authorization, and also the rtFA cookie enables signing the user all SharePoint sites, whether or not the sign-out process starts from the non-SharePoint site.

So, it is sufficient to provide SPOIDCRL HTTP header to be able to perform authentication in SharePoint Online/Office 365, for instance:

The next examples helps guide you to do active authentication in SharePointOnline/Office 365 by supplying FedAuth cookie.

Example 1: Retrieve FormDigest via SharePoint 2013 REST API (uisng MsOnlineClaimsHelper class )

Example 2: Retrieve FormDigest via SharePoint 2013 REST API (using SharePointOnlineCredentials class )

The modified form of the instance for installing personal files:

My concern is that whenever I attempt to download personal files from sharepoint (by performing an HTTP request via HttpClient for an URL for example link ), the fact is effective Only When Provided Both FedAuth and also the rtFa cookie. The FedAuth isn't sufficient. Thus, I must obtain the rtFa cookie OR made that request work without them. Ps: I don't understand what a FormDigest is. metaphori August 29 '14 at 12:36

Really, when i effectively were able to DOWNLOAD personal files using both FedAuth and rtFA, switched up attention as to the I figured was the origin from the issue: the lack of ability to obtain the rtFa cookie. I'll update my question. metaphori August 29 '14 at 12:57

Related recipes

Trader joes speculoos cookie butter recipe
Possibly you've heard about a food phenomenon known as Cookie Butter. Possibly you've wondered from whence the eponymous butter comes. Question forget about, for Trader Joe's Speculoos Cookies are herein revealed is the source. Now, should you've looked carefully in the Cookie Butter
Easy cookie pie crust recipe
I really like everything cheesecakes and cream pies. These recipes more often than not need a cookie cake crust, mostly graham cracker cake crust. Yes, you can easily purchase the pre-made cookie cake crusts in the store why do this when homemade cookie cake crust are extremely simple to make and
Easy cookie crumb crust recipe
I really like everything cheesecakes and cream pies. These recipes more often than not need a cookie cake crust, mostly graham cracker cake crust. Yes, you can easily purchase the pre-made cookie cake crusts in the store why do this when homemade cookie cake crust are extremely simple to make and
Paula deens oatmeal raisin cookie recipe
We loved these cookies & required the remainder to utilize rave reviews. They are very tasty & there are numerous good ingredients. We enjoyed the additional spices. The glaze would be a nice touch although not necessary. For individuals wanting the cut the sugars, you can eliminate this task &
Soaked oatmeal raisin cookie recipe
Scrumptious cookies! My daughter and that i made these together this mid-day. I discovered the directions to be really accurate - even lower to the amount of cookies. I made use of a little meatball scooper to determine and created exactly 72 cookies. They hold their shape well while baking - very
Cookie dough recipe for cookie cutters
1/2 c. butter 1/2 c. sugar 2 eggs 1 teaspoon. vanilla 2 teaspoon. baking powder 2 3/4 c. flour Inside a large bowl, cream butter and sugar by having an electric mixer. Beat in eggs and vanilla. Add baking powder and flour (1 cup at any given time). Dough can be really stiff. Might be

0 comments

Yummy Desserts

Venta de maquina de donuts recipe
Desserts
Venta de maquina de donuts recipe
Esta semana Lidl nos tentaba una vez ms disadvantage 1 de sus "TopInch, 1 de esos pequeos electrodomsticos que tanto xito tiene y del que circulan por la red cientos de comentarios, os estoy hablando en mquina de donuts® . Yo estaba deseando comparla y estrenarla para comprobar si de verdad
Best maple glazed donut recipe
Desserts
Best maple glazed donut recipe
I had been so excited after i had a promo package from Singing Dog Vanilla now, full of organic vanilla beans, extract and paste! Before my little vanilla bean series (take a look at my Homemade Vanilla Bean Pudding or these divine Vanilla Bean Cake Truffles with Toasted Pistachios ). And So I
Pecan pumpkin glazed donuts recipe
Desserts
Pecan pumpkin glazed donuts recipe
The very best recipe for pumpkin donuts having a pecan glaze which are egg-free. Gluten-free vegan donut recipe for pumpkin donuts. An enjoyable breakfast morning for that holidays. 1/2 cup potato starch 1/2 cup + 2 tablespoons of brown grain flour 1 teaspoon pumpkin cake spice 2 1/2 teaspoon
Cuchillito y tenedor donuts recipe
Desserts
Cuchillito y tenedor donuts recipe
Seoras y seores no sigan buscando&... Si l'ensemble des sucede lo mismo que a m y van buscando la receta ideal de donuts, l'ensemble des recomiendo que prueben crime tardar esta que hoy l'ensemble des presento. Tras una bsqueda intensa y diversas pruebas disadvantage desigual resultado he

Tasty Soups

Divas can cook cabbage soup diet recipe
Soup
Divas can cook cabbage soup diet recipe
I’m likely to Disneyland in a few days and made the decision which i didn’t wish to take my muffin top beside me, especially since i have have this cute form fitting top that I wish to put on sooooo bad&.... WITHOUT SPANX!! When I have to lose my gut or ten pounds rapidly I use 3 diets
Tomato soup recipe crock pot fresh tomatoes
Soup
Tomato soup recipe crock pot fresh tomatoes
I’ve made many a tomato soup within my day. This recipe is definitely my personal favorite. It’s easy, it’s comforting, it’s healthy. An easy version created using simple clean stuff&... just veggies, herbs, seasonings, and broth. That’s it. Meaning the soup is both Whole30
Cockaleekie soup recipe with prunes and leeks
Soup
Cockaleekie soup recipe with prunes and leeks
Carrying out a effective career like a chef and restaurateur, British born Elaine Lemm is really a highly respected drink and food author and lately voted among the top 50 within the United kingdom. She's an excellent desire for British Food and Irish Food, both modern and traditional. Updated
Recipe potato leek soup with ham
Soup
Recipe potato leek soup with ham
Ingredients 2 Tablespoons of unsalted butter 4 cups thinly sliced leeks, white-colored and lightweight eco-friendly parts only 4 cups chicken broth* 2 large russet taters, peeled, reduce 1/2 inch pieces 1/2 teaspoon ground white-colored pepper 2 cups pork, diced 1/4 cup cream or half and half

Healthy Salads

Braised lamb shank recipe greek salad
Salad
Braised lamb shank recipe greek salad
Ingredients 3 cups all-purpose flour two tablespoons kosher salt and freshly ground pepper blend (60:40 mixture) 2 (14 to twenty-ounce) lamb shanks two tablespoons grapeseed oil 4 cups dark wine 1 cup peeled and chopped carrots 2 ribs celery, chopped 1/3 cup chopped red onion two tablespoons
Canned tuna and daikon salad recipe
Salad
Canned tuna and daikon salad recipe
Feb 17, 2010 Tuna, Parsley & Radish Salad Sometimes I believe I am inside my most creative a few days before vacation. It's among the couple of occasions after i diligently size up exactly what I've within the refrigerator and kitchen, and consider uses of everything before we leave. The hurry
Baby arugula salad dressing recipe
Salad
Baby arugula salad dressing recipe
For arugula enthusiasts, this Baby Arugula Salad with Lemon, Balsamic Vinegar, Parmesan, and Pine Nuts would work best with the Thanksgiving table, but I'd eat this salad any season! It had been around three years back which i observed salads with baby arugula, lemon, and Parmesan turning up around
Black eyed pea salad with corn recipe
Salad
Black eyed pea salad with corn recipe
Ingredients 1 1/2 cups dried black-eyed peas 1 onion, peeled, decline in half and tied to two cloves 1 bay leaf 2 teaspoons salt plus two tablespoons salt 1 teaspoon freshly ground pepper 10 ears fresh corn, shucked two tablespoons salt 3 thin zucchini, diced 4 crookneck yellow squash, diced 8

Like Pizza?

Pizza nachos recipe pepperoni roll
Pizza
Pizza nachos recipe pepperoni roll
Heat peanut oil inside a 7- to eight-qt. pot over high until it registers 375 on the chocolate/deep-fry thermometer. Heat essential olive oil and butter inside a saucepan over medium for that creamy pesto. Add garlic clove and prepare 12 minutes. Stir in flour and prepare one minute more. Whiskin
Margarita pizza recipe olive oil
Pizza
Margarita pizza recipe olive oil
Pizza Margherita is really a pizza prepared based on a recipe from the Italian chef Raffaelle Esposito. The pizza was initially produced in 1899 when Queen Marghereta visited Napels to flee a cholera epidemic in northern Italia. The components used to create a Margherita pizza, tomatos, mozzarella
Pizza sticks recipe by chef gulzar
Pizza
Pizza sticks recipe by chef gulzar
Many thanks for writing this recipe. When my older sister was at junior high she made these in her own home ec class but yet since that time my mother lost the recipe. (It's been more than fifteen years.) These pizza sticks were certainly one of my personal favorite and I am unable to wait to
Frozen smores dessert pizza recipe
Pizza
Frozen smores dessert pizza recipe
So tasty! I made use of a stone bar pan also it did not obtain the cookie dough completely baked through (however it was still being super tasty). I'll just give a few minutes towards the bake time the next time. Once I chose to make this, a buddy attempted it with brownies rather of cookie dough,
Go Up